Salome HOME
d89e7796f76a306ace4929bf23dfe270751cdaf0
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IPartition.hxx
1 //NOTE: This is an intreface to a function for the Partition creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #include "TColStd_HSequenceOfTransient.hxx"
7 #include "TColStd_HArray1OfInteger.hxx"
8
9 #define PART_ARG_LIMIT   1
10 #define PART_ARG_SHAPES  2
11 #define PART_ARG_TOOLS   3
12 #define PART_ARG_KEEP_IN 4
13 #define PART_ARG_REM_IN  5
14
15 #define PART_ARG_MATERIALS 6
16
17 #define PART_ARG_SHAPE 7
18 #define PART_ARG_PLANE 8
19
20 class GEOMImpl_IPartition
21 {
22  public:
23
24   GEOMImpl_IPartition(Handle(GEOM_Function) theFunction): _func(theFunction) {}
25
26   void SetLimit(int theLimit) { _func->SetInteger(PART_ARG_LIMIT, theLimit); }
27
28   void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
29   { _func->SetReferenceList(PART_ARG_SHAPES, theShapes); }
30
31   void SetTools(const Handle(TColStd_HSequenceOfTransient)& theShapes)
32   { _func->SetReferenceList(PART_ARG_TOOLS, theShapes); }
33
34   void SetKeepIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
35   { _func->SetReferenceList(PART_ARG_KEEP_IN, theShapes); }
36
37   void SetRemoveIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
38   { _func->SetReferenceList(PART_ARG_REM_IN, theShapes); }
39
40   void SetMaterials(const Handle(TColStd_HArray1OfInteger)& theMaterials)
41   { _func->SetIntegerArray(PART_ARG_MATERIALS, theMaterials); }
42
43
44   int GetLimit() { return _func->GetInteger(PART_ARG_LIMIT); }
45
46   Handle(TColStd_HSequenceOfTransient) GetShapes()    { return _func->GetReferenceList(PART_ARG_SHAPES); }
47   Handle(TColStd_HSequenceOfTransient) GetTools()     { return _func->GetReferenceList(PART_ARG_TOOLS); }
48   Handle(TColStd_HSequenceOfTransient) GetKeepIns()   { return _func->GetReferenceList(PART_ARG_KEEP_IN); }
49   Handle(TColStd_HSequenceOfTransient) GetRemoveIns() { return _func->GetReferenceList(PART_ARG_REM_IN); }
50
51   Handle(TColStd_HArray1OfInteger) GetMaterials() { return _func->GetIntegerArray(PART_ARG_MATERIALS); }
52
53
54   void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(PART_ARG_SHAPE, theShape); }
55   void SetPlane(Handle(GEOM_Function) thePlane) { _func->SetReference(PART_ARG_PLANE, thePlane); }
56
57   Handle(GEOM_Function) GetShape() { return _func->GetReference(PART_ARG_SHAPE); }
58   Handle(GEOM_Function) GetPlane() { return _func->GetReference(PART_ARG_PLANE); }
59
60  private:
61
62   Handle(GEOM_Function) _func;
63 };