Salome HOME
Reference Bathymetry objects moved to base for geometry objects class.
[modules/hydro.git] / src / HYDROData / HYDROData_Calculation.h
1
2
3 #ifndef HYDROData_Calculation_HeaderFile
4 #define HYDROData_Calculation_HeaderFile
5
6 #include <HYDROData_Entity.h>
7
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_Region);
10
11 DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity)
12
13
14 /**\class HYDROData_Calculation
15  * \brief Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94.
16  *
17  */
18 class HYDROData_Calculation : public HYDROData_Entity
19 {
20
21 protected:
22
23   /**
24    * Enumeration of tags corresponding to the persistent object parameters.
25    */
26   enum DataTag
27   {
28     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
29     DataTag_GeometryObject,   ///< reference geometry objects
30     DataTag_Region            ///< reference regions
31   };
32
33   /**
34    * Enumeration of tags corresponding to the child sub-objects of object.
35    */
36   enum ChildTag
37   {
38     ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
39     ChildTag_Region      ///< child regions
40   };
41
42 public:
43
44   DEFINE_STANDARD_RTTI(HYDROData_Calculation);
45
46   /**
47    * Returns the kind of this object. Must be redefined in all objects of known type.
48    */
49   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
50
51
52   /**
53    * Dump Calculation object to Python script representation.
54    */
55   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
56
57 public:      
58   // Public methods to work with Calculation
59
60   /**
61    * Split reference geometry objects to non-intersected regions.
62    */
63   HYDRODATA_EXPORT virtual void SplitGeometryObjects();
64
65
66   /**
67    * Add new one reference geometry object for calculation case.
68    */
69   HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
70
71   /**
72    * Returns all reference geometry objects of calculation case.
73    */
74   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
75
76   /**
77    * Removes reference geometry object from calculation case.
78    */
79   HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
80
81   /**
82    * Removes all reference geometry objects from calculation case.
83    */
84   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
85
86
87   /**
88    * Add new one region for calculation case.
89    * The new region is added into the list of reference regions.
90    */
91   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion();
92
93
94   /**
95    * Add new one reference region for calculation case.
96    */
97   HYDRODATA_EXPORT virtual bool AddRegion( Handle(HYDROData_Region)& theRegion );
98
99   /**
100    * Returns all reference regions of calculation case.
101    */
102   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
103
104   /**
105    * Removes reference region from calculation case.
106    */
107   HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
108
109   /**
110    * Removes all reference regions from calculation case.
111    */
112   HYDRODATA_EXPORT virtual void RemoveRegions();
113
114 protected:
115
116   friend class HYDROData_Iterator;
117
118   /**
119    * Creates new object in the internal data structure. Use higher level objects 
120    * to create objects with real content.
121    */
122   HYDROData_Calculation();
123
124   /**
125    * Destructs properties of the object and object itself, removes it from the document.
126    */
127   ~HYDROData_Calculation();
128 };
129
130 #endif