Salome HOME
The "MustBeUpdated" flag is moved to base data object class and implemented for calcu...
[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_ChildRegion,      ///< child regions
32     DataTag_Region            ///< reference regions
33   };
34
35 public:
36
37   DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
38
39   /**
40    * Returns the kind of this object. Must be redefined in all objects of known type.
41    */
42   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
43
44
45   /**
46    * Dump Calculation object to Python script representation.
47    */
48   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
49
50 public:      
51   // Public methods to work with Calculation
52
53   /**
54    * Split reference geometry objects to non-intersected regions.
55    */
56   HYDRODATA_EXPORT virtual void SplitGeometryObjects();
57
58
59   /**
60    * Add new one reference geometry object for calculation case.
61    */
62   HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
63
64   /**
65    * Returns all reference geometry objects of calculation case.
66    */
67   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
68
69   /**
70    * Removes reference geometry object from calculation case.
71    */
72   HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
73
74   /**
75    * Removes all reference geometry objects from calculation case.
76    */
77   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
78
79
80   /**
81    * Add new one child region for calculation case.
82    * The new region is added into the list of reference regions.
83    * The label of theZone is changed during this operation
84    * because of new region becomes the new parent for this zone.
85    */
86   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
87
88
89   /**
90    * Add new one reference region for calculation case.
91    * The label of theRegion is changed in case if old parent is not this calculation.
92    */
93   HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
94
95   /**
96    * Returns all reference regions of calculation case.
97    */
98   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
99
100   /**
101    * Removes reference region from calculation case.
102    */
103   HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
104
105   /**
106    * Removes all reference regions from calculation case.
107    */
108   HYDRODATA_EXPORT virtual void RemoveRegions();
109
110 private:
111
112   /**
113    * Add new one region for calculation case.
114    * The new region is added into the list of reference regions.
115    */
116   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
117
118
119 protected:
120
121   friend class HYDROData_Iterator;
122
123   /**
124    * Creates new object in the internal data structure. Use higher level objects 
125    * to create objects with real content.
126    */
127   HYDROData_CalculationCase();
128
129   /**
130    * Destructs properties of the object and object itself, removes it from the document.
131    */
132   ~HYDROData_CalculationCase();
133 };
134
135 #endif