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