Salome HOME
ENV: Windows porting.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Study.hxx
1 //  File   : SALOMEDS_Study.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDS_STUDY_H__
6 #define __SALOMEDS_STUDY_H__
7
8 #include <vector>
9 #include <string>
10
11 #include "SALOMEDSClient.hxx"
12 #include "SALOMEDSImpl_Study.hxx"
13
14 // IDL headers
15 #include <SALOMEconfig.h>
16 #include CORBA_SERVER_HEADER(SALOMEDS)
17
18 class SALOMEDS_Study: public SALOMEDSClient_Study
19 {
20
21 private:
22   bool                       _isLocal;
23   Handle(SALOMEDSImpl_Study) _local_impl;
24   SALOMEDS::Study_var        _corba_impl;
25   CORBA::ORB_var             _orb;
26
27 public:
28
29   SALOMEDS_Study(const Handle(SALOMEDSImpl_Study)& theStudy);
30   SALOMEDS_Study(SALOMEDS::Study_ptr theStudy);
31   ~SALOMEDS_Study();
32
33   virtual std::string GetPersistentReference();
34   virtual std::string GetTransientReference();
35   virtual bool IsEmpty();
36   virtual _PTR(SComponent) FindComponent (const std::string& aComponentName);
37   virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID);
38   virtual _PTR(SObject) FindObject(const std::string& anObjectName);
39   virtual std::vector<_PTR(SObject)> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) ;  
40   virtual _PTR(SObject) FindObjectID(const std::string& anObjectID);
41   virtual _PTR(SObject) CreateObjectID(const std::string& anObjectID);
42   virtual _PTR(SObject) FindObjectIOR(const std::string& anObjectIOR);
43   virtual _PTR(SObject) FindObjectByPath(const std::string& thePath);
44   virtual std::string GetObjectPath(const _PTR(SObject)& theSO);
45   virtual void SetContext(const std::string& thePath);
46   virtual std::string GetContext();  
47   virtual std::vector<std::string> GetObjectNames(const std::string& theContext);
48   virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext);
49   virtual std::vector<std::string> GetFileNames(const std::string& theContext);
50   virtual std::vector<std::string> GetComponentNames(const std::string& theContext);
51   virtual _PTR(ChildIterator) NewChildIterator(const _PTR(SObject)& theSO);
52   virtual _PTR(SComponentIterator) NewComponentIterator();
53   virtual _PTR(StudyBuilder) NewBuilder();
54   virtual std::string Name();
55   virtual void  Name(const std::string& name);
56   virtual bool IsSaved();
57   virtual void  IsSaved(bool save);
58   virtual bool IsModified();
59   virtual std::string URL();
60   virtual void  URL(const std::string& url);
61   virtual int StudyId();
62   virtual void  StudyId(int id);
63   virtual std::vector<_PTR(SObject)> FindDependances(const _PTR(SObject)& theSO);
64   virtual _PTR(AttributeStudyProperties) GetProperties();
65   virtual std::string GetLastModificationDate();
66   virtual std::vector<std::string> GetModificationsDate();
67   virtual _PTR(UseCaseBuilder) GetUseCaseBuilder();
68   virtual void Close();
69   virtual void EnableUseCaseAutoFilling(bool isEnabled);
70   virtual bool DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished); 
71
72   std::string ConvertObjectToIOR(CORBA::Object_ptr theObject);
73   CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR);     
74
75   SALOMEDS::Study_ptr GetStudy();
76
77 private:
78   void init_orb();
79
80 };
81 #endif