Back to index

salome-kernel  6.5.0
SALOMEDSClient_Study.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  File   : SALOMEDSClient_Study.hxx
00024 //  Author : Sergey RUIN
00025 //  Module : SALOME
00026 //
00027 #ifndef __SALOMEDSClient_STUDY_H__
00028 #define __SALOMEDSClient_STUDY_H__
00029 
00030 #include <vector>
00031 #include <string>
00032 
00033 #include "SALOMEDSClient_definitions.hxx"
00034 #include "SALOMEDSClient_SComponentIterator.hxx"
00035 #include "SALOMEDSClient_StudyBuilder.hxx"
00036 #include "SALOMEDSClient_AttributeParameter.hxx"
00037 #include "SALOMEDSClient_SObject.hxx"
00038 #include "SALOMEDSClient_SComponent.hxx"
00039 #include "SALOMEDSClient_UseCaseBuilder.hxx"
00040 #include "SALOMEDSClient_AttributeStudyProperties.hxx"
00041 #include "SALOMEDSClient_ChildIterator.hxx"
00042 #include "SALOMEDSClient_Observer.hxx"
00043 #include <SALOMEconfig.h>
00044 #include CORBA_CLIENT_HEADER(SALOMEDS)
00045 
00046 class SALOMEDSClient_Study
00047 {
00048 
00049 public:
00050   virtual ~SALOMEDSClient_Study() {}
00051 
00052   virtual std::string GetPersistentReference() = 0;
00053   virtual std::string GetTransientReference() = 0;
00054   virtual bool IsEmpty() = 0;
00055   virtual _PTR(SComponent) FindComponent (const std::string& aComponentName) = 0;
00056   virtual _PTR(SComponent) FindComponentID(const std::string& aComponentID) = 0;
00057   virtual _PTR(SObject) FindObject(const std::string& anObjectName) = 0;
00058   virtual std::vector<_PTR(SObject)> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) = 0;  
00059   virtual _PTR(SObject) FindObjectID(const std::string& anObjectID) = 0;
00060   virtual _PTR(SObject) CreateObjectID(const std::string& anObjectID) = 0;
00061   virtual _PTR(SObject) FindObjectIOR(const std::string& anObjectIOR) = 0;
00062   virtual _PTR(SObject) FindObjectByPath(const std::string& thePath) = 0;
00063   virtual std::string GetObjectPath(const _PTR(SObject)& theSO) = 0;
00064   virtual void SetContext(const std::string& thePath) = 0;
00065   virtual std::string GetContext() = 0;  
00066   virtual std::vector<std::string> GetObjectNames(const std::string& theContext) = 0;
00067   virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext) = 0;
00068   virtual std::vector<std::string> GetFileNames(const std::string& theContext) = 0;
00069   virtual std::vector<std::string> GetComponentNames(const std::string& theContext) = 0;
00070   virtual _PTR(ChildIterator) NewChildIterator(const _PTR(SObject)& theSO) = 0;
00071   virtual _PTR(SComponentIterator) NewComponentIterator() = 0;
00072   virtual _PTR(StudyBuilder) NewBuilder() = 0;
00073   virtual std::string Name() = 0;
00074   virtual void  Name(const std::string& name) = 0;
00075   virtual bool IsSaved() = 0;
00076   virtual void  IsSaved(bool save) = 0;
00077   virtual bool IsModified() = 0;
00078   virtual void Modified() = 0;
00079   virtual std::string URL() = 0;
00080   virtual void  URL(const std::string& url) = 0;
00081   virtual int StudyId() = 0;
00082   virtual void  StudyId(int id) = 0;
00083   virtual std::vector<_PTR(SObject)> FindDependances(const _PTR(SObject)& theSO) = 0;
00084   virtual _PTR(AttributeStudyProperties) GetProperties() = 0;
00085   virtual std::string GetLastModificationDate() = 0;
00086   virtual std::vector<std::string> GetModificationsDate() = 0;
00087   virtual _PTR(UseCaseBuilder) GetUseCaseBuilder() = 0;
00088   virtual void Close() = 0;
00089   virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0;
00090   virtual bool DumpStudy(const std::string& thePath, 
00091                          const std::string& theBaseName, 
00092                          bool isPublished,
00093                          bool isMultiFile) = 0;
00094   virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint) = 0;
00095   virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, 
00096                                                        const std::string& theModuleName, int theSavePoint) = 0;
00097   virtual void SetStudyLock(const std::string& theLockerID) = 0;
00098   virtual bool IsStudyLocked() = 0;
00099   virtual void UnLockStudy(const std::string& theLockerID) = 0;
00100   virtual std::vector<std::string> GetLockerID() = 0;
00101 
00102   virtual void SetReal(const std::string& theVarName, const double theValue) = 0;
00103   virtual void SetInteger(const std::string& theVarName, const int theValue) = 0;
00104   virtual void SetBoolean(const std::string& theVarName, const bool theValue) = 0;  
00105   virtual void SetString(const std::string& theVarName, const std::string& theValue) = 0;
00106   virtual void SetStringAsDouble(const std::string& theVarName, const double theValue) = 0;
00107 
00108   virtual double GetReal(const std::string& theVarName) = 0;
00109   virtual int GetInteger(const std::string& theVarName) = 0;
00110   virtual bool GetBoolean(const std::string& theVarName) = 0;
00111   virtual std::string GetString(const std::string& theVarName) = 0;
00112   
00113   virtual bool IsReal(const std::string& theVarName) = 0;
00114   virtual bool IsInteger(const std::string& theVarName) = 0;
00115   virtual bool IsBoolean(const std::string& theVarName) = 0;
00116   virtual bool IsString(const std::string& theVarName) = 0;
00117   
00118   virtual bool IsVariable(const std::string& theVarName) = 0;
00119   virtual std::vector<std::string> GetVariableNames() = 0;
00120 
00121   virtual bool RemoveVariable(const std::string& theVarName) = 0;
00122   virtual bool RenameVariable(const std::string& theVarName,
00123                               const std::string& theNewVarName) = 0;
00124   virtual bool IsVariableUsed(const std::string& theVarName) = 0;
00125 
00126   virtual std::vector< std::vector<std::string> > ParseVariables(const std::string& theVars) = 0;
00127 
00128   virtual void attach(SALOMEDS::Observer_ptr theObserver,bool modify) = 0;
00129 
00130 };
00131 
00132 
00133 #endif