Salome HOME
Has functionality from SalomeApp without dependency from CORBA
[modules/gui.git] / src / LightApp / LightApp_DataObject.h
1 #ifndef LIGHTAPP_DATAOBJECT_H
2 #define LIGHTAPP_DATAOBJECT_H
3
4 #include "LightApp.h"
5
6 #include "CAM_DataObject.h"
7 #include "CAM_DataModel.h"
8 #include "CAM_RootObject.h"
9
10 class LightApp_Study;
11
12 /*!Description : Data Object has empty entry so it's children must redefine metod entry() and return some unique string*/
13 // to do : decomment virtual inheritance 
14 class LIGHTAPP_EXPORT LightApp_DataObject : public virtual CAM_DataObject
15 {
16   class Key;
17
18 public:
19   enum { CT_Value, CT_Entry, CT_IOR, CT_RefEntry };
20
21 public:
22   LightApp_DataObject( SUIT_DataObject* = 0 );
23   virtual ~LightApp_DataObject();
24
25   virtual SUIT_DataObjectKey*     key() const;
26   virtual QString                 entry() const;
27
28   virtual SUIT_DataObject*        componentObject() const;
29   virtual QString                 componentDataType() const;
30
31 };
32
33 /*!
34  * LightApp_ModuleObject - class for optimized access to DataModel from
35  * CAM_RootObject.h.
36  * In modules which will be redefine LightApp_DataObject, LightApp_ModuleObject must be children from rederined DataObject for having necessary properties and children from LightApp_ModuleObject.
37  */
38
39 class LIGHTAPP_EXPORT LightApp_ModuleObject : public CAM_RootObject
40 {
41 public:
42   LightApp_ModuleObject( SUIT_DataObject* = 0 );
43   LightApp_ModuleObject ( CAM_DataModel*, SUIT_DataObject* = 0 );
44
45   virtual ~LightApp_ModuleObject();
46
47   virtual QString        name() const;
48   virtual void           insertChild( SUIT_DataObject*, int thePosition );
49 };
50
51 #endif