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