Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOM / GEOM_ISubShape.hxx
1 // NOTE: This is an intreface to a function for the Shapes
2 // (Wire, Face, Shell, Solid and Compound) creation.
3
4
5 #include "GEOM_Function.hxx"
6
7 #include "TColStd_HSequenceOfTransient.hxx"
8 #include "TColStd_HArray1OfInteger.hxx"
9
10 #define SHAPE_ARG_MAIN_SHAPE     1 
11 #define SHAPE_ARG_INDICES             2 
12 #define SHAPE_ARG_SORTED             3
13
14 class GEOM_ISubShape
15 {
16  public:
17
18   GEOM_ISubShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
19
20   void SetMainShape(Handle(GEOM_Function) theRefBase)
21   { _func->SetReference(SHAPE_ARG_MAIN_SHAPE, theRefBase); }
22
23   Handle(GEOM_Function) GetMainShape() { return _func->GetReference(SHAPE_ARG_MAIN_SHAPE); }
24
25   void SetIndices(const Handle(TColStd_HArray1OfInteger)& theIndices)
26   { _func->SetIntegerArray(SHAPE_ARG_INDICES, theIndices); }
27
28   Handle(TColStd_HArray1OfInteger) GetIndices()
29   { return _func->GetIntegerArray(SHAPE_ARG_INDICES); }
30
31  private:
32
33   Handle(GEOM_Function) _func;
34 };