Salome HOME
77a24578b773114e5f38d27a9b4735da441cc808
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyBuilder_i.hxx
1 //  File   : SALOMEDS_StudyBuilder_i.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDS_STUDYBUILDER_I_H__
6 #define __SALOMEDS_STUDYBUILDER_I_H__
7
8 // std C++ headers
9 #include <iostream>
10
11 // IDL headers
12 #include <SALOMEconfig.h>
13 #include CORBA_SERVER_HEADER(SALOMEDS)
14 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
15
16 #include "SALOMEDSImpl_StudyBuilder.hxx"
17
18 // Cascade header
19 #include <TDocStd_Document.hxx>
20
21 class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder,
22                                public PortableServer::RefCountServantBase 
23 {
24 private:
25   CORBA::ORB_ptr                    _orb;
26   Handle(SALOMEDSImpl_StudyBuilder) _impl;  // OCAF Document
27 public:
28     
29   SALOMEDS_StudyBuilder_i(const Handle(SALOMEDSImpl_StudyBuilder), CORBA::ORB_ptr);
30
31   ~SALOMEDS_StudyBuilder_i();
32
33   //! NewComponent
34   /*!
35     \param ComponentDataType    
36     \return <ReturnValue>
37   */
38   virtual SALOMEDS::SComponent_ptr NewComponent(const char* ComponentDataType);
39
40   //! DefineComponentInstance
41   /*!
42     \param SComponent_ptr       
43     \param ComponentIOR 
44   */
45   virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
46   
47   //! 
48   /*!
49     <long-description>
50
51     \param aComponent   
52   */
53   virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
54
55   //! 
56   /*!
57     <long-description>
58
59     \param theFatherObject      
60     \return <ReturnValue>
61   */
62   virtual SALOMEDS::SObject_ptr NewObject(SALOMEDS::SObject_ptr theFatherObject);
63   //! 
64   /*!
65     <long-description>
66
67     \param theFatherObject      
68     \param atag 
69     \return <ReturnValue>
70   */
71   virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
72
73   /*!
74     The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used)
75   */
76   virtual void AddDirectory(const char* thePath);
77
78   virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
79     throw(SALOME::SALOME_Exception);
80   virtual void Load(SALOMEDS::SObject_ptr sco);
81
82   virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
83   virtual void RemoveObjectWithChildren(SALOMEDS::SObject_ptr anObject);
84
85   virtual SALOMEDS::GenericAttribute_ptr FindOrCreateAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
86   virtual CORBA::Boolean FindAttribute(SALOMEDS::SObject_ptr anObject, SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
87   virtual void RemoveAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
88
89   virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
90
91   virtual void RemoveReference(SALOMEDS::SObject_ptr me);
92
93   virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
94   virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
95
96   virtual void NewCommand();
97   virtual void CommitCommand() throw(SALOMEDS::StudyBuilder::LockProtection);
98   virtual CORBA::Boolean HasOpenCommand();
99   virtual void AbortCommand();
100   virtual void Undo() throw(SALOMEDS::StudyBuilder::LockProtection);
101   virtual void Redo() throw(SALOMEDS::StudyBuilder::LockProtection);
102   CORBA::Boolean GetAvailableUndos();
103   CORBA::Boolean GetAvailableRedos();
104   CORBA::Boolean IsSaved();
105   CORBA::Boolean IsModified();
106   virtual CORBA::Long UndoLimit();
107   virtual void UndoLimit(CORBA::Long);
108
109   void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
110
111   virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
112   virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
113   virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
114 };
115 #endif