Salome HOME
Fictive 3D object for objects with 2 types of presentation (Bug #216).
[modules/hydro.git] / src / HYDROData / HYDROData_DummyObject3D.h
1
2 #ifndef HYDROData_DummyObject3D_HeaderFile
3 #define HYDROData_DummyObject3D_HeaderFile
4
5 #include <HYDROData_Entity.h>
6
7 DEFINE_STANDARD_HANDLE(HYDROData_DummyObject3D, HYDROData_Entity)
8
9 class Handle(HYDROData_Object);
10 class TopoDS_Shape;
11
12 /**\class HYDROData_DummyObject3D
13  * \brief The artificial objects are objects created or planned for creation by human.
14  *
15  */
16 class HYDROData_DummyObject3D : 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   };
26
27 public:
28   DEFINE_STANDARD_RTTI(HYDROData_DummyObject3D);
29
30 public:
31
32   /**
33    * Returns the kind of this object. Must be redefined in all objects of known type.
34    */
35   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_DUMMY_3D; }
36
37   /**
38    * Returns the name of this object.
39    */
40   HYDRODATA_EXPORT virtual QString GetName() const;
41
42   /**
43    * Returns flag indicating that object is updateble or not.
44    */
45   HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
46
47   /**
48    * Returns flag indicating that object can be removed or not.
49    */
50   HYDRODATA_EXPORT virtual bool CanRemove();
51
52
53   /**
54    * Returns the parent object.
55    */
56   HYDRODATA_EXPORT Handle(HYDROData_Object) GetObject() const;
57
58   /**
59    * Returns the 3d shape of the parent object.
60    */
61   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
62
63
64   /**
65    * Returns filling color of object.
66    */
67   HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
68
69   /**
70    * Returns border color of object.
71    */
72   HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
73
74
75 protected:
76
77   friend class HYDROData_Iterator;
78
79   /**
80    * Creates new object in the internal data structure. Use higher level objects 
81    * to create objects with real content.
82    */
83   HYDRODATA_EXPORT HYDROData_DummyObject3D();
84
85   /**
86    * Destructs properties of the object and object itself, removes it from the document.
87    */
88   virtual HYDRODATA_EXPORT ~HYDROData_DummyObject3D();
89 };
90
91 #endif