Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyManager.hxx
1 //  File   : SALOMEDS_StudyManager.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDS_STUDYMANAGER_H__
6 #define __SALOMEDS_STUDYMANAGER_H__
7
8 #include <vector>
9 #include <string>
10
11 #include "SALOMEDSClient.hxx"
12 #include "SALOMEDSImpl_StudyManager.hxx"
13
14 // IDL headers
15
16 #include <SALOMEconfig.h>
17 #include CORBA_SERVER_HEADER(SALOMEDS)
18
19 class Standard_EXPORT SALOMEDS_StudyManager: public SALOMEDSClient_StudyManager
20 {
21 private:
22   bool                              _isLocal;
23   Handle(SALOMEDSImpl_StudyManager) _local_impl;
24   SALOMEDS::StudyManager_var        _corba_impl;  
25   CORBA::ORB_var                    _orb;
26
27 public:
28
29   SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager);
30   SALOMEDS_StudyManager();
31   ~SALOMEDS_StudyManager();
32
33   virtual _PTR(Study) NewStudy(const std::string& study_name);
34   virtual _PTR(Study) Open(const std::string& theStudyUrl);
35   virtual void Close(const _PTR(Study)& theStudy);
36   virtual void Save(const _PTR(Study)& theStudy, bool theMultiFile);
37   virtual void SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile);
38   virtual void SaveAs(const std::string& theUrl,  const _PTR(Study)& theStudy, bool theMultiFile);
39   virtual void SaveAsASCII(const std::string& theUrl,  const _PTR(Study)& theStudy, bool theMultiFile);
40   virtual std::vector<std::string> GetOpenStudies();
41   virtual _PTR(Study) GetStudyByName(const std::string& theStudyName) ;
42   virtual _PTR(Study) GetStudyByID(int theStudyID) ;
43   virtual bool CanCopy(const _PTR(SObject)& theSO);
44   virtual bool Copy(const _PTR(SObject)& theSO);
45   virtual bool CanPaste(const _PTR(SObject)& theSO);
46   virtual _PTR(SObject) Paste(const _PTR(SObject)& theSO); 
47
48 private:
49   void init_orb();
50 };
51
52 #endif