Salome HOME
Dump to Python script correction.
[modules/hydro.git] / src / HYDROData / HYDROData_Zone.h
1
2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
4
5 #include <HYDROData_Entity.h>
6
7 class Handle(HYDROData_Object);
8 class TopoDS_Shape;
9
10 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
11
12
13 /**\class HYDROData_Zone
14  * \brief Class that stores/retreives information about the 2d face.
15  */
16 class HYDROData_Zone : public HYDROData_Entity
17 {
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 shape
27     DataTag_GeometryObject,   ///< reference geometry objects
28   };
29
30 public:
31   DEFINE_STANDARD_RTTI(HYDROData_Zone);
32
33   /**
34    * Returns the kind of this object. Must be redefined in all objects of known type.
35    */
36   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
37
38   /**
39    * Dump object to Python script representation.
40    */
41   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
42
43
44   /**
45    * Sets the shape of the zone.
46    */
47   HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
48
49   /**
50    * Returns the shape of the zone.
51    */
52   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
53
54
55   /**
56    * Returns number of geometry objects for zone.
57    */
58   HYDRODATA_EXPORT virtual int NbGeometryObjects() const;
59
60   /**
61    * Add new one geometry object for zone.
62    */
63   HYDRODATA_EXPORT virtual void AddGeometryObject( const Handle(HYDROData_Object)& theObject );
64
65   /**
66    * Replace the geometry object for zone.
67    */
68   HYDRODATA_EXPORT virtual void SetGeometryObject( const int                       theIndex,
69                                                    const Handle(HYDROData_Object)& theObject );
70
71   /**
72    * Sets the geometry object for zone.
73    */
74   HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
75
76   /**
77    * Returns geometry object of zone by index.
78    */
79   HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
80
81   /**
82    * Returns all geometry objects of zone.
83    */
84   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
85
86   /**
87    * Removes all geometry objects from zone.
88    */
89   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
90
91
92 protected:
93
94   friend class HYDROData_Region;
95   friend class HYDROData_Iterator;
96
97   /**
98    * Creates new object in the internal data structure. Use higher level objects 
99    * to create objects with real content.
100    */
101   HYDROData_Zone();
102
103   /**
104    * Destructs properties of the object and object itself, removes it from the document.
105    */
106   ~HYDROData_Zone();
107
108 };
109
110 #endif