]> SALOME platform Git repositories - modules/gui.git/blob - src/LightApp/LightApp_DataObject.h
Salome HOME
1f194ffc2306e03662d839100616d02ed070e2c6
[modules/gui.git] / src / LightApp / LightApp_DataObject.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef LIGHTAPP_DATAOBJECT_H
20 #define LIGHTAPP_DATAOBJECT_H
21
22 #include "LightApp.h"
23
24 #include "CAM_DataObject.h"
25 #include "CAM_DataModel.h"
26 #include "CAM_RootObject.h"
27
28 class LightApp_Study;
29
30 /*!Description : Data Object has empty entry so it's children must redefine metod entry() and return some unique string*/
31 // to do : decomment virtual inheritance 
32 class LIGHTAPP_EXPORT LightApp_DataObject : public virtual CAM_DataObject
33 {
34   class Key;
35
36 public:
37   enum { CT_Value, CT_Entry, CT_IOR, CT_RefEntry };
38
39 public:
40   LightApp_DataObject( SUIT_DataObject* = 0 );
41   virtual ~LightApp_DataObject();
42
43   virtual SUIT_DataObjectKey*     key() const;
44   virtual QString                 entry() const;
45
46   virtual SUIT_DataObject*        componentObject() const;
47   virtual QString                 componentDataType() const;
48
49 protected:
50   QString                         myCompDataType;
51   SUIT_DataObject*                myCompObject;
52 };
53
54 /*!
55  * LightApp_ModuleObject - class for optimized access to DataModel from
56  * CAM_RootObject.h.
57  * 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.
58  */
59
60 class LIGHTAPP_EXPORT LightApp_ModuleObject : public CAM_RootObject
61 {
62 public:
63   LightApp_ModuleObject( SUIT_DataObject* = 0 );
64   LightApp_ModuleObject ( CAM_DataModel*, SUIT_DataObject* = 0 );
65
66   virtual ~LightApp_ModuleObject();
67
68   virtual QString        name() const;
69   virtual void           insertChild( SUIT_DataObject*, int thePosition );
70 };
71
72 #endif