1 // File: SalomeApp_DataModel.h
2 // Created: 10/25/2004 10:32:33 AM
3 // Author: Sergey LITONIN
4 // Copyright (C) CEA 2004
6 #ifndef SALOMEAPP_DATAMODEL_H
7 #define SALOMEAPP_DATAMODEL_H
11 #endif // _MSC_VER > 1000
13 #include "SalomeApp.h"
14 #include "CAM_DataModel.h"
16 #include "SALOMEDSClient.hxx"
18 class SalomeApp_Module;
19 class SalomeApp_Study;
20 class SalomeApp_DataObject;
21 class SalomeApp_SelectionMgr;
23 // Class : SalomeApp_DataModel
24 /// Description : Base class of data model
25 class SALOMEAPP_EXPORT SalomeApp_DataModel : public CAM_DataModel
30 static SUIT_DataObject* BuildTree(const _PTR(SObject)& obj,
31 SUIT_DataObject* parent,
32 SalomeApp_Study* study,
35 SalomeApp_DataModel ( CAM_Module* theModule );
36 virtual ~SalomeApp_DataModel();
38 /** @name These methods should be redefined in successors.*/
40 virtual bool open( const QString&, CAM_Study* );
42 virtual bool saveAs( const QString&, CAM_Study* );
45 virtual void update( SalomeApp_DataObject* = 0, SalomeApp_Study* = 0 );
47 virtual bool isModified() const;
48 virtual bool isSaved() const;
57 SalomeApp_Module* getModule() const;
58 SalomeApp_Study* getStudy() const;
60 virtual void buildTree(const _PTR(SObject)&, SUIT_DataObject*, SalomeApp_Study* );
62 /** @name methods to be used by CORBAless modules*/
64 std::vector<std::string> GetListOfFiles () const;
65 void SetListOfFiles (const std::vector<std::string> theListOfFiles);
67 static std::string GetTmpDir (const char* theURL,
68 const bool isMultiFile);
70 void RemoveTemporaryFiles (const bool isMultiFile) const;
72 // END: methods to be used by CORBAless modules
75 QString getRootEntry( SalomeApp_Study* ) const;