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 void Dump( std::ostream& theStream ) const;
37 static void Dump( std::ostream& theStream,
38 const NCollection_Sequence<GroupDefinition>& theGroups );
40 TCollection_AsciiString Name;
41 TopTools_SequenceOfShape Shapes;
43 typedef NCollection_Sequence<GroupDefinition> SeqOfGroupsDefs;
47 * Enumeration of tags corresponding to the persistent object parameters.
51 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
52 DataTag_Shape, ///< reference edges
56 DEFINE_STANDARD_RTTI(HYDROData_ShapesGroup);
59 * Returns the kind of this object. Must be redefined in all objects of known type.
61 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SHAPES_GROUP; }
64 * Returns flag indicating that object is updateble or not.
66 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
69 * Returns flag indicating that object can be removed or not.
71 HYDRODATA_EXPORT virtual bool CanRemove();
74 // Public methods to work with reference Shapes
77 * Add new one shape for the group.
79 HYDRODATA_EXPORT virtual void AddShape( const TopoDS_Shape& theShape );
82 * Sets new sequence of shapes for the group.
84 HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes );
87 * Sets new list of shapes for the group.
89 HYDRODATA_EXPORT virtual void SetShapes( const TopTools_ListOfShape& theShapes );
92 * Returns all shapes of the group.
94 HYDRODATA_EXPORT virtual void GetShapes( TopTools_SequenceOfShape& theShapes ) const;
97 * Removes all shapes from the group.
99 HYDRODATA_EXPORT virtual void RemoveShapes();
104 friend class HYDROData_Iterator;
107 * Creates new object in the internal data structure. Use higher level objects
108 * to create objects with real content.
110 HYDRODATA_EXPORT HYDROData_ShapesGroup();
113 * Destructs properties of the object and object itself, removes it from the document.
115 virtual HYDRODATA_EXPORT ~HYDROData_ShapesGroup();