Salome HOME
f13561376522c036b6a2b89ec01de30c1f4fbd36
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyBuilder.hxx
1 //  File   : SALOMEDS_StudyBuilder.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDS_STUDYBUILDER_H__
6 #define __SALOMEDS_STUDYBUILDER_H__
7
8 #include "SALOMEDSClient.hxx"
9 #include "SALOMEDSImpl_StudyBuilder.hxx"
10
11 // IDL headers
12 #include <SALOMEconfig.h>
13 #include CORBA_SERVER_HEADER(SALOMEDS)
14
15
16 class SALOMEDS_StudyBuilder: public SALOMEDSClient_StudyBuilder
17 {
18 private:
19   bool _isLocal;
20   Handle(SALOMEDSImpl_StudyBuilder) _local_impl;
21   SALOMEDS::StudyBuilder_var        _corba_impl;
22   CORBA::ORB_var                    _orb;
23
24 public:
25
26   SALOMEDS_StudyBuilder(const Handle(SALOMEDSImpl_StudyBuilder)& theBuilder);
27   SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
28   ~SALOMEDS_StudyBuilder();
29
30   virtual _PTR(SComponent) NewComponent(const std::string& ComponentDataType);
31   virtual void DefineComponentInstance (const _PTR(SComponent)&, const std::string& ComponentIOR);
32   virtual void RemoveComponent(const _PTR(SComponent)& theSCO);
33   virtual _PTR(SObject) NewObject(const _PTR(SObject)& theFatherObject);
34   virtual _PTR(SObject) NewObjectToTag(const _PTR(SObject)& theFatherObject, int theTag);
35   virtual void AddDirectory(const std::string& thePath);
36   virtual void LoadWith(const _PTR(SComponent)& theSCO, const std::string& theIOR);
37   virtual void Load(const _PTR(SObject)& theSCO);
38   virtual void RemoveObject(const _PTR(SObject)& theSO);
39   virtual void RemoveObjectWithChildren(const _PTR(SObject)& theSO);
40   virtual _PTR(GenericAttribute) FindOrCreateAttribute(const _PTR(SObject)& theSO, 
41                                                        const std::string& aTypeOfAttribute);
42   virtual bool FindAttribute(const _PTR(SObject)& theSO, 
43                              _PTR(GenericAttribute)& theAttribute, 
44                              const std::string& aTypeOfAttribute);
45   virtual void RemoveAttribute(const _PTR(SObject)& theSO, const std::string& aTypeOfAttribute);
46   virtual void Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject);
47   virtual void RemoveReference(const _PTR(SObject)& me);
48   virtual void SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
49   virtual bool IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID);
50   virtual void NewCommand();
51   virtual void CommitCommand();
52   virtual bool HasOpenCommand();
53   virtual void AbortCommand();
54   virtual void Undo();
55   virtual void Redo();
56   virtual bool GetAvailableUndos();
57   virtual bool GetAvailableRedos();
58   virtual int UndoLimit();
59   virtual void UndoLimit(int theLimit);
60   virtual void SetName(const _PTR(SObject)& theSO, const std::string& theValue);
61   virtual void SetComment(const _PTR(SObject)& theSO, const std::string& theValue);
62   virtual void SetIOR(const _PTR(SObject)& theSO, const std::string& theValue);
63
64 private:
65   void CheckLocked();
66   void init_orb();
67 };
68 #endif