]> SALOME platform Git repositories - modules/kernel.git/blob - src/SALOMEDSClient/SALOMEDSClient_Study.hxx
Salome HOME
13273ab2aa62e1b5f1a3fcdd0f71980f035fd452
[modules/kernel.git] / src / SALOMEDSClient / SALOMEDSClient_Study.hxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  File   : SALOMEDSClient_Study.hxx
24 //  Author : Sergey RUIN
25 //  Module : SALOME
26 //
27 #ifndef __SALOMEDSClient_STUDY_H__
28 #define __SALOMEDSClient_STUDY_H__
29
30 #include <vector>
31 #include <string>
32
33 #include "SALOMEDSClient_definitions.hxx"
34 #include "SALOMEDSClient_SComponentIterator.hxx"
35 #include "SALOMEDSClient_StudyBuilder.hxx"
36 #include "SALOMEDSClient_AttributeParameter.hxx"
37 #include "SALOMEDSClient_SObject.hxx"
38 #include "SALOMEDSClient_SComponent.hxx"
39 #include "SALOMEDSClient_UseCaseBuilder.hxx"
40 #include "SALOMEDSClient_AttributeStudyProperties.hxx"
41 #include "SALOMEDSClient_ChildIterator.hxx"
42
43 class SALOMEDSClient_Study
44 {
45
46 public:
47   virtual ~SALOMEDSClient_Study() {}
48
49   virtual std::string GetPersistentReference() = 0;
50   virtual std::string GetTransientReference() = 0;
51   virtual bool IsEmpty() = 0;
52   virtual _PTR(SComponent) FindComponent (const std::string& aComponentName) = 0;
53   virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID) = 0;
54   virtual _PTR(SObject) FindObject(const std::string& anObjectName) = 0;
55   virtual std::vector<_PTR(SObject)> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) = 0;  
56   virtual _PTR(SObject) FindObjectID(const std::string& anObjectID) = 0;
57   virtual _PTR(SObject) CreateObjectID(const std::string& anObjectID) = 0;
58   virtual _PTR(SObject) FindObjectIOR(const std::string& anObjectIOR) = 0;
59   virtual _PTR(SObject) FindObjectByPath(const std::string& thePath) = 0;
60   virtual std::string GetObjectPath(const _PTR(SObject)& theSO) = 0;
61   virtual void SetContext(const std::string& thePath) = 0;
62   virtual std::string GetContext() = 0;  
63   virtual std::vector<std::string> GetObjectNames(const std::string& theContext) = 0;
64   virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext) = 0;
65   virtual std::vector<std::string> GetFileNames(const std::string& theContext) = 0;
66   virtual std::vector<std::string> GetComponentNames(const std::string& theContext) = 0;
67   virtual _PTR(ChildIterator) NewChildIterator(const _PTR(SObject)& theSO) = 0;
68   virtual _PTR(SComponentIterator) NewComponentIterator() = 0;
69   virtual _PTR(StudyBuilder) NewBuilder() = 0;
70   virtual std::string Name() = 0;
71   virtual void  Name(const std::string& name) = 0;
72   virtual bool IsSaved() = 0;
73   virtual void  IsSaved(bool save) = 0;
74   virtual bool IsModified() = 0;
75   virtual void Modified() = 0;
76   virtual std::string URL() = 0;
77   virtual void  URL(const std::string& url) = 0;
78   virtual int StudyId() = 0;
79   virtual void  StudyId(int id) = 0;
80   virtual std::vector<_PTR(SObject)> FindDependances(const _PTR(SObject)& theSO) = 0;
81   virtual _PTR(AttributeStudyProperties) GetProperties() = 0;
82   virtual std::string GetLastModificationDate() = 0;
83   virtual std::vector<std::string> GetModificationsDate() = 0;
84   virtual _PTR(UseCaseBuilder) GetUseCaseBuilder() = 0;
85   virtual void Close() = 0;
86   virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0;
87   virtual bool DumpStudy(const std::string& thePath, 
88                          const std::string& theBaseName, 
89                          bool isPublished) = 0;
90   virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint) = 0;
91   virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, 
92                                                        const std::string& theModuleName, int theSavePoint) = 0;
93   virtual void SetStudyLock(const std::string& theLockerID) = 0;
94   virtual bool IsStudyLocked() = 0;
95   virtual void UnLockStudy(const std::string& theLockerID) = 0;
96   virtual std::vector<std::string> GetLockerID() = 0;
97
98   virtual void SetReal(const std::string& theVarName, const double theValue) = 0;
99   virtual void SetInteger(const std::string& theVarName, const int theValue) = 0;
100   virtual void SetBoolean(const std::string& theVarName, const bool theValue) = 0;  
101   virtual void SetString(const std::string& theVarName, const std::string& theValue) = 0;
102   virtual void SetStringAsDouble(const std::string& theVarName, const double theValue) = 0;
103
104   virtual double GetReal(const std::string& theVarName) = 0;
105   virtual int GetInteger(const std::string& theVarName) = 0;
106   virtual bool GetBoolean(const std::string& theVarName) = 0;
107   virtual std::string GetString(const std::string& theVarName) = 0;
108   
109   virtual bool IsReal(const std::string& theVarName) = 0;
110   virtual bool IsInteger(const std::string& theVarName) = 0;
111   virtual bool IsBoolean(const std::string& theVarName) = 0;
112   virtual bool IsString(const std::string& theVarName) = 0;
113   
114   virtual bool IsVariable(const std::string& theVarName) = 0;
115   virtual std::vector<std::string> GetVariableNames() = 0;
116
117   virtual bool RemoveVariable(const std::string& theVarName) = 0;
118   virtual bool RenameVariable(const std::string& theVarName,
119                               const std::string& theNewVarName) = 0;
120   virtual bool IsVariableUsed(const std::string& theVarName) = 0;
121
122   virtual std::vector< std::vector<std::string> > ParseVariables(const std::string& theVars) = 0;
123   
124 };
125
126
127 #endif