Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / SalomeApp / SalomeApp_DataModel.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/ or email : webmaster.salome@opencascade.com
18 //
19 // File:      SalomeApp_DataModel.h
20 // Created:   10/25/2004 10:32:33 AM
21 // Author:    Sergey LITONIN
22 // Copyright (C) CEA 2004
23
24 #ifndef SALOMEAPP_DATAMODEL_H
25 #define SALOMEAPP_DATAMODEL_H
26
27 #if _MSC_VER > 1000
28 #pragma once
29 #endif // _MSC_VER > 1000
30
31 #include "SalomeApp.h"
32 #include "LightApp_DataModel.h"
33
34 #include "SALOMEDSClient.hxx"
35
36 class SalomeApp_Module;
37 class SalomeApp_Study;
38 class SalomeApp_DataObject;
39
40 //   Class       : SalomeApp_DataModel
41 ///  Description : Base class of data model
42 class SALOMEAPP_EXPORT SalomeApp_DataModel : public LightApp_DataModel
43 {
44   Q_OBJECT
45
46 public:
47   static SUIT_DataObject*             synchronize( const _PTR( SComponent )&, SalomeApp_Study* );
48
49   SalomeApp_DataModel ( CAM_Module* theModule );
50   virtual ~SalomeApp_DataModel();
51
52   virtual bool                        open( const QString&, CAM_Study*, QStringList );
53   virtual bool                        create( CAM_Study* );
54   virtual void                        update( LightApp_DataObject* = 0, LightApp_Study* = 0 );
55
56   QString                             getRootEntry( SalomeApp_Study* ) const;
57   SalomeApp_Module*                   getModule() const;
58
59 protected:
60   SalomeApp_Study*                    getStudy() const;
61   virtual void                        updateTree( const _PTR( SComponent )&, SalomeApp_Study* );
62 };
63
64
65 #endif