Salome HOME
8d6a1948ba44ab1c63c8994c495eb97c6fa5801e
[modules/hydro.git] / src / HYDROData / HYDROData_ShapesGroup.h
1
2 #ifndef HYDROData_ShapesGroup_HeaderFile
3 #define HYDROData_ShapesGroup_HeaderFile
4
5 #include <HYDROData_Entity.h>
6
7 #include <TopTools_SequenceOfShape.hxx>
8
9 class TopoDS_Shape;
10 class TopTools_ListOfShape;
11
12 DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity)
13
14 /**\class HYDROData_ShapesGroup
15  * \brief Class that stores/retreives the sequence of shapes.
16  */
17 class HYDROData_ShapesGroup : public HYDROData_Entity
18 {
19 protected:
20   /**
21    * Enumeration of tags corresponding to the persistent object parameters.
22    */
23   enum DataTag
24   {
25     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
26     DataTag_Shape,   ///< reference edges
27   };
28
29 public:
30   DEFINE_STANDARD_RTTI(HYDROData_ShapesGroup);
31
32   /**
33    * Returns the kind of this object. Must be redefined in all objects of known type.
34    */
35   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SHAPES_GROUP; }
36
37   /**
38    * Returns flag indicating that object is updateble or not.
39    */
40   HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
41
42     /**
43    * Returns flag indicating that object can be removed or not.
44    */
45   HYDRODATA_EXPORT virtual bool CanRemove();
46
47 public:      
48   // Public methods to work with reference Shapes
49
50   /**
51    * Add new one shape for the group.
52    */
53   HYDRODATA_EXPORT virtual void AddShape( const TopoDS_Shape& theShape );
54
55   /**
56    * Sets new sequence of shapes for the group.
57    */
58   HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes );
59
60   /**
61    * Sets new list of shapes for the group.
62    */
63   HYDRODATA_EXPORT virtual void SetShapes( const TopTools_ListOfShape& theShapes );
64
65   /**
66    * Returns all shapes of the group.
67    */
68   HYDRODATA_EXPORT virtual void GetShapes( TopTools_SequenceOfShape& theShapes ) const;
69
70   /**
71    * Removes all shapes from the group.
72    */
73   HYDRODATA_EXPORT virtual void RemoveShapes();
74
75
76 protected:
77
78   friend class HYDROData_Iterator;
79
80   /**
81    * Creates new object in the internal data structure. Use higher level objects 
82    * to create objects with real content.
83    */
84   HYDRODATA_EXPORT HYDROData_ShapesGroup();
85
86   /**
87    * Destructs properties of the object and object itself, removes it from the document.
88    */
89   virtual HYDRODATA_EXPORT ~HYDROData_ShapesGroup();
90 };
91
92 #endif