Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Study.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOMEDS_Study.hxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24 #ifndef __SALOMEDS_STUDY_H__
25 #define __SALOMEDS_STUDY_H__
26
27 #include <vector>
28 #include <string>
29
30 #include "SALOMEDSClient.hxx"
31 #include "SALOMEDSImpl_Study.hxx"
32
33 // IDL headers
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOMEDS)
36
37 class Standard_EXPORT SALOMEDS_Study: public SALOMEDSClient_Study
38 {
39
40 private:
41   bool                       _isLocal;
42   Handle(SALOMEDSImpl_Study) _local_impl;
43   SALOMEDS::Study_var        _corba_impl;
44   CORBA::ORB_var             _orb;
45
46 public:
47
48   SALOMEDS_Study(const Handle(SALOMEDSImpl_Study)& theStudy);
49   SALOMEDS_Study(SALOMEDS::Study_ptr theStudy);
50   ~SALOMEDS_Study();
51
52   virtual std::string GetPersistentReference();
53   virtual std::string GetTransientReference();
54   virtual bool IsEmpty();
55   virtual _PTR(SComponent) FindComponent (const std::string& aComponentName);
56   virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID);
57   virtual _PTR(SObject) FindObject(const std::string& anObjectName);
58   virtual std::vector<_PTR(SObject)> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) ;  
59   virtual _PTR(SObject) FindObjectID(const std::string& anObjectID);
60   virtual _PTR(SObject) CreateObjectID(const std::string& anObjectID);
61   virtual _PTR(SObject) FindObjectIOR(const std::string& anObjectIOR);
62   virtual _PTR(SObject) FindObjectByPath(const std::string& thePath);
63   virtual std::string GetObjectPath(const _PTR(SObject)& theSO);
64   virtual void SetContext(const std::string& thePath);
65   virtual std::string GetContext();  
66   virtual std::vector<std::string> GetObjectNames(const std::string& theContext);
67   virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext);
68   virtual std::vector<std::string> GetFileNames(const std::string& theContext);
69   virtual std::vector<std::string> GetComponentNames(const std::string& theContext);
70   virtual _PTR(ChildIterator) NewChildIterator(const _PTR(SObject)& theSO);
71   virtual _PTR(SComponentIterator) NewComponentIterator();
72   virtual _PTR(StudyBuilder) NewBuilder();
73   virtual std::string Name();
74   virtual void  Name(const std::string& name);
75   virtual bool IsSaved();
76   virtual void  IsSaved(bool save);
77   virtual bool IsModified();
78   virtual std::string URL();
79   virtual void  URL(const std::string& url);
80   virtual int StudyId();
81   virtual void  StudyId(int id);
82   virtual std::vector<_PTR(SObject)> FindDependances(const _PTR(SObject)& theSO);
83   virtual _PTR(AttributeStudyProperties) GetProperties();
84   virtual std::string GetLastModificationDate();
85   virtual std::vector<std::string> GetModificationsDate();
86   virtual _PTR(UseCaseBuilder) GetUseCaseBuilder();
87   virtual void Close();
88   virtual void EnableUseCaseAutoFilling(bool isEnabled);
89   virtual bool DumpStudy(const std::string& thePath,const std::string& theBaseName,bool isPublished); 
90   virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint);
91   virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, 
92                                                        const std::string& theModuleName, int theSavePoint);
93   std::string ConvertObjectToIOR(CORBA::Object_ptr theObject);
94   CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR);     
95
96   SALOMEDS::Study_ptr GetStudy();
97
98 private:
99   void init_orb();
100
101 };
102 #endif