1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 //NOTE: This is an intreface to a function for the Partition creation.
23 #include "GEOM_Function.hxx"
25 #include "TColStd_HSequenceOfTransient.hxx"
26 #include "TColStd_HArray1OfInteger.hxx"
28 #define PART_ARG_LIMIT 1
29 #define PART_ARG_SHAPES 2
30 #define PART_ARG_TOOLS 3
31 #define PART_ARG_KEEP_IN 4
32 #define PART_ARG_REM_IN 5
34 #define PART_ARG_MATERIALS 6
36 #define PART_ARG_SHAPE 7
37 #define PART_ARG_PLANE 8
39 class GEOMImpl_IPartition
43 GEOMImpl_IPartition(Handle(GEOM_Function) theFunction): _func(theFunction) {}
45 void SetLimit(int theLimit) { _func->SetInteger(PART_ARG_LIMIT, theLimit); }
47 void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes)
48 { _func->SetReferenceList(PART_ARG_SHAPES, theShapes); }
50 void SetTools(const Handle(TColStd_HSequenceOfTransient)& theShapes)
51 { _func->SetReferenceList(PART_ARG_TOOLS, theShapes); }
53 void SetKeepIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
54 { _func->SetReferenceList(PART_ARG_KEEP_IN, theShapes); }
56 void SetRemoveIns(const Handle(TColStd_HSequenceOfTransient)& theShapes)
57 { _func->SetReferenceList(PART_ARG_REM_IN, theShapes); }
59 void SetMaterials(const Handle(TColStd_HArray1OfInteger)& theMaterials)
60 { _func->SetIntegerArray(PART_ARG_MATERIALS, theMaterials); }
63 int GetLimit() { return _func->GetInteger(PART_ARG_LIMIT); }
65 Handle(TColStd_HSequenceOfTransient) GetShapes() { return _func->GetReferenceList(PART_ARG_SHAPES); }
66 Handle(TColStd_HSequenceOfTransient) GetTools() { return _func->GetReferenceList(PART_ARG_TOOLS); }
67 Handle(TColStd_HSequenceOfTransient) GetKeepIns() { return _func->GetReferenceList(PART_ARG_KEEP_IN); }
68 Handle(TColStd_HSequenceOfTransient) GetRemoveIns() { return _func->GetReferenceList(PART_ARG_REM_IN); }
70 Handle(TColStd_HArray1OfInteger) GetMaterials() { return _func->GetIntegerArray(PART_ARG_MATERIALS); }
73 void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(PART_ARG_SHAPE, theShape); }
74 void SetPlane(Handle(GEOM_Function) thePlane) { _func->SetReference(PART_ARG_PLANE, thePlane); }
76 Handle(GEOM_Function) GetShape() { return _func->GetReference(PART_ARG_SHAPE); }
77 Handle(GEOM_Function) GetPlane() { return _func->GetReference(PART_ARG_PLANE); }
81 Handle(GEOM_Function) _func;