2 #ifndef HYDROData_ShapesGroup_HeaderFile
3 #define HYDROData_ShapesGroup_HeaderFile
5 #include <HYDROData_Entity.h>
7 #include <TopTools_SequenceOfShape.hxx>
12 class TopTools_ListOfShape;
13 class BRepBuilderAPI_MakeShape;
14 class ShapeUpgrade_UnifySameDomain;
16 DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity)
18 /**\class HYDROData_ShapesGroup
19 * \brief Class that stores/retreives the sequence of shapes.
21 class HYDROData_ShapesGroup : public HYDROData_Entity
25 struct GroupDefinition
29 static void Update( NCollection_Sequence<GroupDefinition>* theGroupsDefs,
30 BRepBuilderAPI_MakeShape* theAlgo );
32 static void Update( NCollection_Sequence<GroupDefinition>* theGroupsDefs,
33 ShapeUpgrade_UnifySameDomain* theAlgo );
35 TCollection_AsciiString Name;
36 TopTools_SequenceOfShape Shapes;
38 typedef NCollection_Sequence<GroupDefinition> SeqOfGroupsDefs;
42 * Enumeration of tags corresponding to the persistent object parameters.
46 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
47 DataTag_Shape, ///< reference edges
51 DEFINE_STANDARD_RTTI(HYDROData_ShapesGroup);
54 * Returns the kind of this object. Must be redefined in all objects of known type.
56 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SHAPES_GROUP; }
59 * Returns flag indicating that object is updateble or not.
61 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
64 * Returns flag indicating that object can be removed or not.
66 HYDRODATA_EXPORT virtual bool CanRemove();
69 // Public methods to work with reference Shapes
72 * Add new one shape for the group.
74 HYDRODATA_EXPORT virtual void AddShape( const TopoDS_Shape& theShape );
77 * Sets new sequence of shapes for the group.
79 HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes );
82 * Sets new list of shapes for the group.
84 HYDRODATA_EXPORT virtual void SetShapes( const TopTools_ListOfShape& theShapes );
87 * Returns all shapes of the group.
89 HYDRODATA_EXPORT virtual void GetShapes( TopTools_SequenceOfShape& theShapes ) const;
92 * Removes all shapes from the group.
94 HYDRODATA_EXPORT virtual void RemoveShapes();
99 friend class HYDROData_Iterator;
102 * Creates new object in the internal data structure. Use higher level objects
103 * to create objects with real content.
105 HYDRODATA_EXPORT HYDROData_ShapesGroup();
108 * Destructs properties of the object and object itself, removes it from the document.
110 virtual HYDRODATA_EXPORT ~HYDROData_ShapesGroup();