1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SALOMEDS_Study.hxx
21 // Author : Sergey RUIN
24 #ifndef __SALOMEDS_STUDY_H__
25 #define __SALOMEDS_STUDY_H__
30 #include "SALOMEDSClient.hxx"
31 #include "SALOMEDSImpl_Study.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOMEDS)
37 class Standard_EXPORT SALOMEDS_Study: public SALOMEDSClient_Study
42 SALOMEDSImpl_Study* _local_impl;
43 SALOMEDS::Study_var _corba_impl;
48 SALOMEDS_Study(SALOMEDSImpl_Study* theStudy);
49 SALOMEDS_Study(SALOMEDS::Study_ptr theStudy);
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 void Modified();
79 virtual std::string URL();
80 virtual void URL(const std::string& url);
81 virtual int StudyId();
82 virtual void StudyId(int id);
83 virtual std::vector<_PTR(SObject)> FindDependances(const _PTR(SObject)& theSO);
84 virtual _PTR(AttributeStudyProperties) GetProperties();
85 virtual std::string GetLastModificationDate();
86 virtual std::vector<std::string> GetModificationsDate();
87 virtual _PTR(UseCaseBuilder) GetUseCaseBuilder();
89 virtual void EnableUseCaseAutoFilling(bool isEnabled);
90 virtual bool DumpStudy(const std::string& thePath,const std::string& theBaseName,bool isPublished);
91 virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint);
92 virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID,
93 const std::string& theModuleName, int theSavePoint);
94 virtual void SetStudyLock(const std::string& theLockerID);
95 virtual bool IsStudyLocked();
96 virtual void UnLockStudy(const std::string& theLockerID);
97 virtual std::vector<std::string> GetLockerID();
99 std::string ConvertObjectToIOR(CORBA::Object_ptr theObject);
100 CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR);
102 SALOMEDS::Study_ptr GetStudy();