Version: 9.15.0
SALOMEDSClient_Study.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2025 CEA, EDF, 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, or (at your option) any later version.
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 
43 #include <SALOMEconfig.h>
44 #include CORBA_CLIENT_HEADER(SALOMEDS)
45 
47 {
48 
49 public:
50  virtual ~SALOMEDSClient_Study() {}
51 
52  virtual void Init() = 0;
53  virtual void Clear() = 0;
54 
55  virtual bool Open(const std::string& theStudyUrl) = 0;
56  virtual bool CanOpen(const std::string& theStudyUrl) = 0;
57 
58  virtual std::string GetPersistentReference() = 0;
59  virtual bool IsEmpty() = 0;
60  virtual _PTR(SComponent) FindComponent (const std::string& aComponentName) = 0;
61  virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID) = 0;
62  virtual _PTR(SObject) FindObject(const std::string& anObjectName) = 0;
63  virtual std::vector<_PTR(SObject)> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) = 0;
64  virtual _PTR(SObject) FindObjectID(const std::string& anObjectID) = 0;
65  virtual _PTR(SObject) CreateObjectID(const std::string& anObjectID) = 0;
66  virtual _PTR(SObject) FindObjectIOR(const std::string& anObjectIOR) = 0;
67  virtual _PTR(SObject) FindObjectByPath(const std::string& thePath) = 0;
68  virtual std::string GetObjectPath(const _PTR(SObject)& theSO) = 0;
69  virtual _PTR(ChildIterator) NewChildIterator(const _PTR(SObject)& theSO) = 0;
70  virtual _PTR(SComponentIterator) NewComponentIterator() = 0;
71  virtual _PTR(StudyBuilder) NewBuilder() = 0;
72  virtual std::string Name() = 0;
73  virtual void Name(const std::string& aName) = 0;
74  virtual bool IsSaved() = 0;
75  virtual void IsSaved(bool save) = 0;
76  virtual bool IsModified() = 0;
77  virtual void Modified() = 0;
78  virtual std::string URL() = 0;
79  virtual void URL(const std::string& url) = 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 
86  virtual bool Save(bool theMultiFile, bool theASCII) = 0;
87  virtual bool SaveAs(const std::string& theUrl, bool theMultiFile, bool theASCII) = 0;
88 
89  virtual bool CanCopy(const _PTR(SObject)& theSO) = 0;
90  virtual bool Copy(const _PTR(SObject)& theSO) = 0;
91  virtual bool CanPaste(const _PTR(SObject)& theSO) = 0;
92  virtual _PTR(SObject) Paste(const _PTR(SObject)& theSO) = 0;
93 
94  virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0;
95  virtual bool DumpStudy(const std::string& thePath,
96  const std::string& theBaseName,
97  bool isPublished,
98  bool isMultiFile) = 0;
99  virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint) = 0;
100  virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID,
101  const std::string& theModuleName, int theSavePoint) = 0;
102  virtual void SetStudyLock(const std::string& theLockerID) = 0;
103  virtual bool IsStudyLocked() = 0;
104  virtual void UnLockStudy(const std::string& theLockerID) = 0;
105  virtual std::vector<std::string> GetLockerID() = 0;
106 
107  virtual void SetReal(const std::string& theVarName, const double theValue) = 0;
108  virtual void SetInteger(const std::string& theVarName, const int theValue) = 0;
109  virtual void SetBoolean(const std::string& theVarName, const bool theValue) = 0;
110  virtual void SetString(const std::string& theVarName, const std::string& theValue) = 0;
111  virtual void SetStringAsDouble(const std::string& theVarName, const double theValue) = 0;
112 
113  virtual double GetReal(const std::string& theVarName) = 0;
114  virtual int GetInteger(const std::string& theVarName) = 0;
115  virtual bool GetBoolean(const std::string& theVarName) = 0;
116  virtual std::string GetString(const std::string& theVarName) = 0;
117 
118  virtual bool IsReal(const std::string& theVarName) = 0;
119  virtual bool IsInteger(const std::string& theVarName) = 0;
120  virtual bool IsBoolean(const std::string& theVarName) = 0;
121  virtual bool IsString(const std::string& theVarName) = 0;
122 
123  virtual bool IsVariable(const std::string& theVarName) = 0;
124  virtual std::vector<std::string> GetVariableNames() = 0;
125 
126  virtual bool RemoveVariable(const std::string& theVarName) = 0;
127  virtual bool RenameVariable(const std::string& theVarName,
128  const std::string& theNewVarName) = 0;
129  virtual bool IsVariableUsed(const std::string& theVarName) = 0;
130 
131  virtual std::vector< std::vector<std::string> > ParseVariables(const std::string& theVars) = 0;
132 
133  virtual void attach(SALOMEDS::Observer_ptr theObserver,bool modify) = 0;
134  virtual void detach(SALOMEDS::Observer_ptr theObserver) = 0;
135 };
136 
137 
138 #endif
#define _PTR(Class)
Definition: SALOMEDSClient_definitions.hxx:72
Definition: SALOMEDSClient_Study.hxx:47
virtual int GetInteger(const std::string &theVarName)=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > FindObject(const std::string &anObjectName)=0
virtual void SetReal(const std::string &theVarName, const double theValue)=0
virtual void IsSaved(bool save)=0
virtual bool CanCopy(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual clt_shared_ptr< SALOMEDSClient_ChildIterator > NewChildIterator(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual void Clear()=0
virtual bool Save(bool theMultiFile, bool theASCII)=0
virtual std::string URL()=0
virtual std::vector< std::string > GetVariableNames()=0
virtual std::vector< clt_shared_ptr< SALOMEDSClient_SObject > > FindObjectByName(const std::string &anObjectName, const std::string &aComponentName)=0
virtual void Modified()=0
virtual bool DumpStudy(const std::string &thePath, const std::string &theBaseName, bool isPublished, bool isMultiFile)=0
virtual clt_shared_ptr< SALOMEDSClient_StudyBuilder > NewBuilder()=0
virtual clt_shared_ptr< SALOMEDSClient_AttributeStudyProperties > GetProperties()=0
virtual void SetStudyLock(const std::string &theLockerID)=0
virtual void SetInteger(const std::string &theVarName, const int theValue)=0
virtual bool IsString(const std::string &theVarName)=0
virtual bool IsBoolean(const std::string &theVarName)=0
virtual bool RemoveVariable(const std::string &theVarName)=0
virtual bool GetBoolean(const std::string &theVarName)=0
virtual std::string GetObjectPath(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual clt_shared_ptr< SALOMEDSClient_SComponentIterator > NewComponentIterator()=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > FindObjectID(const std::string &anObjectID)=0
virtual bool CanPaste(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual bool IsVariableUsed(const std::string &theVarName)=0
virtual bool Open(const std::string &theStudyUrl)=0
virtual bool IsSaved()=0
virtual bool CanOpen(const std::string &theStudyUrl)=0
virtual bool IsInteger(const std::string &theVarName)=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > CreateObjectID(const std::string &anObjectID)=0
virtual bool IsReal(const std::string &theVarName)=0
virtual std::vector< clt_shared_ptr< SALOMEDSClient_SObject > > FindDependances(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual void SetString(const std::string &theVarName, const std::string &theValue)=0
virtual std::vector< std::string > GetLockerID()=0
virtual std::vector< std::string > GetModificationsDate()=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > Paste(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual ~SALOMEDSClient_Study()
Definition: SALOMEDSClient_Study.hxx:50
virtual clt_shared_ptr< SALOMEDSClient_SObject > FindObjectByPath(const std::string &thePath)=0
virtual void Name(const std::string &aName)=0
virtual bool IsEmpty()=0
virtual clt_shared_ptr< SALOMEDSClient_AttributeParameter > GetCommonParameters(const std::string &theID, int theSavePoint)=0
virtual clt_shared_ptr< SALOMEDSClient_SComponent > FindComponentID(const std::string &aComponentID)=0
virtual void detach(SALOMEDS::Observer_ptr theObserver)=0
virtual std::string GetPersistentReference()=0
virtual std::vector< std::vector< std::string > > ParseVariables(const std::string &theVars)=0
virtual void SetBoolean(const std::string &theVarName, const bool theValue)=0
virtual bool IsModified()=0
virtual void SetStringAsDouble(const std::string &theVarName, const double theValue)=0
virtual void URL(const std::string &url)=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > FindObjectIOR(const std::string &anObjectIOR)=0
virtual clt_shared_ptr< SALOMEDSClient_UseCaseBuilder > GetUseCaseBuilder()=0
virtual bool Copy(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual double GetReal(const std::string &theVarName)=0
virtual std::string GetString(const std::string &theVarName)=0
virtual bool SaveAs(const std::string &theUrl, bool theMultiFile, bool theASCII)=0
virtual bool IsVariable(const std::string &theVarName)=0
virtual std::string GetLastModificationDate()=0
virtual bool IsStudyLocked()=0
virtual clt_shared_ptr< SALOMEDSClient_AttributeParameter > GetModuleParameters(const std::string &theID, const std::string &theModuleName, int theSavePoint)=0
virtual std::string Name()=0
virtual void EnableUseCaseAutoFilling(bool isEnabled)=0
virtual void UnLockStudy(const std::string &theLockerID)=0
virtual bool RenameVariable(const std::string &theVarName, const std::string &theNewVarName)=0
virtual void Init()=0
virtual void attach(SALOMEDS::Observer_ptr theObserver, bool modify)=0
virtual clt_shared_ptr< SALOMEDSClient_SComponent > FindComponent(const std::string &aComponentName)=0