Version: 9.15.0
SALOMEDS_StudyBuilder.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 : SALOMEDS_StudyBuilder.hxx
24 // Author : Sergey RUIN
25 // Module : SALOME
26 //
27 #ifndef __SALOMEDS_STUDYBUILDER_H__
28 #define __SALOMEDS_STUDYBUILDER_H__
29 
30 #include "SALOMEDS_Defines.hxx"
31 
32 #include "SALOMEDSClient.hxx"
34 #include <pthread.h>
35 
36 // IDL headers
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SALOMEDS)
39 
41 {
42 private:
43  bool _isLocal;
45  SALOMEDS::StudyBuilder_var _corba_impl;
46  CORBA::ORB_var _orb;
47 
48 
49 public:
50  static pthread_mutex_t _remoteBuilderMutex;
51 
53  SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
55 
56  virtual _PTR(SComponent) NewComponent(const std::string& ComponentDataType);
57  virtual void DefineComponentInstance (const _PTR(SComponent)&, const std::string& ComponentIOR);
58  virtual void RemoveComponent(const _PTR(SComponent)& theSCO);
59  virtual _PTR(SObject) NewObject(const _PTR(SObject)& theFatherObject);
60  virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject)& theFatherObject, int theTag);
61  virtual void LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR);
62  virtual void Load(const _PTR(SObject)& theSCO);
63  virtual void RemoveObject(const _PTR(SObject)& theSO);
64  virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO);
65  virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO,
66  const std::string& aTypeOfAttribute);
67  virtual bool FindAttribute(const _PTR(SObject)& theSO,
68  _PTR(GenericAttribute)& theAttribute,
69  const std::string& aTypeOfAttribute);
70  virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute);
71  virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject);
72  virtual void RemoveReference(const _PTR(SObject)& me);
73  virtual void SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
74  virtual bool IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
75  virtual void NewCommand();
76  virtual void CommitCommand();
77  virtual bool HasOpenCommand();
78  virtual void AbortCommand();
79  virtual void Undo();
80  virtual void Redo();
81  virtual bool GetAvailableUndos();
82  virtual bool GetAvailableRedos();
83  virtual int UndoLimit();
84  virtual void UndoLimit(int theLimit);
85  virtual void SetName(const _PTR(SObject)& theSO, const std::string& theValue);
86  virtual void SetComment(const _PTR(SObject)& theSO, const std::string& theValue);
87  virtual void SetIOR(const _PTR(SObject)& theSO, const std::string& theValue);
88 
89  SALOMEDS::StudyBuilder_ptr GetBuilder();
90 
91 private:
92  void CheckLocked();
93  void init_orb();
94 };
95 #endif
#define _PTR(Class)
Definition: SALOMEDSClient_definitions.hxx:72
#define SALOMEDS_EXPORT
Definition: SALOMEDS_Defines.hxx:37
Definition: SALOMEDSClient_StudyBuilder.hxx:37
virtual void SetName(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &theValue)=0
virtual bool GetAvailableRedos()=0
virtual void RemoveComponent(const clt_shared_ptr< SALOMEDSClient_SComponent > &theSCO)=0
virtual void CommitCommand()=0
virtual void SetComment(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &theValue)=0
virtual void DefineComponentInstance(const clt_shared_ptr< SALOMEDSClient_SComponent > &, const std::string &ComponentIOR)=0
virtual void LoadWith(const clt_shared_ptr< SALOMEDSClient_SComponent > &theSCO, const std::string &theIOR)=0
virtual bool GetAvailableUndos()=0
virtual bool HasOpenCommand()=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > NewObject(const clt_shared_ptr< SALOMEDSClient_SObject > &theFatherObject)=0
virtual clt_shared_ptr< SALOMEDSClient_SComponent > NewComponent(const std::string &ComponentDataType)=0
virtual void SetGUID(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &theGUID)=0
virtual void SetIOR(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &theValue)=0
virtual clt_shared_ptr< SALOMEDSClient_SObject > NewObjectToTag(const clt_shared_ptr< SALOMEDSClient_SObject > &theFatherObject, int theTag)=0
virtual void Addreference(const clt_shared_ptr< SALOMEDSClient_SObject > &me, const clt_shared_ptr< SALOMEDSClient_SObject > &thereferencedObject)=0
virtual void RemoveAttribute(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &aTypeOfAttribute)=0
virtual void RemoveReference(const clt_shared_ptr< SALOMEDSClient_SObject > &me)=0
virtual bool FindAttribute(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, clt_shared_ptr< SALOMEDSClient_GenericAttribute > &theAttribute, const std::string &aTypeOfAttribute)=0
virtual void RemoveObjectWithChildren(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual clt_shared_ptr< SALOMEDSClient_GenericAttribute > FindOrCreateAttribute(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &aTypeOfAttribute)=0
virtual void RemoveObject(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO)=0
virtual void Load(const clt_shared_ptr< SALOMEDSClient_SObject > &theSCO)=0
virtual void NewCommand()=0
virtual bool IsGUID(const clt_shared_ptr< SALOMEDSClient_SObject > &theSO, const std::string &theGUID)=0
virtual void AbortCommand()=0
Definition: SALOMEDSImpl_StudyBuilder.hxx:42
Definition: SALOMEDS_StudyBuilder.hxx:41
SALOMEDS::StudyBuilder_var _corba_impl
Definition: SALOMEDS_StudyBuilder.hxx:45
virtual _PTR(SObject) NewObject(const _PTR(SObject) &theFatherObject)
bool _isLocal
Definition: SALOMEDS_StudyBuilder.hxx:43
static pthread_mutex_t _remoteBuilderMutex
Definition: SALOMEDS_StudyBuilder.hxx:50
CORBA::ORB_var _orb
Definition: SALOMEDS_StudyBuilder.hxx:46
SALOMEDSImpl_StudyBuilder * _local_impl
Definition: SALOMEDS_StudyBuilder.hxx:44
virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject) &theFatherObject
virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject) &theSO