Salome HOME
Fix pb. with loading of last module (in list).
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyBuilder_i.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
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.
8 // 
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.
13 //
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
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOMEDS_StudyBuilder_i.hxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24 #ifndef __SALOMEDS_STUDYBUILDER_I_H__
25 #define __SALOMEDS_STUDYBUILDER_I_H__
26
27 // std C++ headers
28 #include <iostream>
29
30 // IDL headers
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SALOMEDS)
33 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
34
35 #include "SALOMEDSImpl_StudyBuilder.hxx"
36
37 class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
38 {
39 private:
40   CORBA::ORB_ptr                    _orb;
41   SALOMEDSImpl_StudyBuilder*        _impl;  
42 public:
43     
44   SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder*, CORBA::ORB_ptr);
45
46   ~SALOMEDS_StudyBuilder_i();
47
48   //! NewComponent
49   /*!
50     \param ComponentDataType    
51     \return <ReturnValue>
52   */
53   virtual SALOMEDS::SComponent_ptr NewComponent(const char* ComponentDataType);
54
55   //! DefineComponentInstance
56   /*!
57     \param SComponent_ptr       
58     \param ComponentIOR 
59   */
60   virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
61   
62   //! 
63   /*!
64     <long-description>
65
66     \param aComponent   
67   */
68   virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
69
70   //! 
71   /*!
72     <long-description>
73
74     \param theFatherObject      
75     \return <ReturnValue>
76   */
77   virtual SALOMEDS::SObject_ptr NewObject(SALOMEDS::SObject_ptr theFatherObject);
78   //! 
79   /*!
80     <long-description>
81
82     \param theFatherObject      
83     \param atag 
84     \return <ReturnValue>
85   */
86   virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
87
88   /*!
89     The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used)
90   */
91   virtual void AddDirectory(const char* thePath);
92
93   virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
94     throw(SALOME::SALOME_Exception);
95   virtual void Load(SALOMEDS::SObject_ptr sco);
96
97   virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
98   virtual void RemoveObjectWithChildren(SALOMEDS::SObject_ptr anObject);
99
100   virtual SALOMEDS::GenericAttribute_ptr FindOrCreateAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
101   virtual CORBA::Boolean FindAttribute(SALOMEDS::SObject_ptr anObject, SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
102   virtual void RemoveAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
103
104   virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
105
106   virtual void RemoveReference(SALOMEDS::SObject_ptr me);
107
108   virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
109   virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
110
111   virtual void NewCommand();
112   virtual void CommitCommand() throw(SALOMEDS::StudyBuilder::LockProtection);
113   virtual CORBA::Boolean HasOpenCommand();
114   virtual void AbortCommand();
115   virtual void Undo() throw(SALOMEDS::StudyBuilder::LockProtection);
116   virtual void Redo() throw(SALOMEDS::StudyBuilder::LockProtection);
117   CORBA::Boolean GetAvailableUndos();
118   CORBA::Boolean GetAvailableRedos();
119   CORBA::Boolean IsSaved();
120   CORBA::Boolean IsModified();
121   virtual CORBA::Long UndoLimit();
122   virtual void UndoLimit(CORBA::Long);
123
124   void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
125
126   virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
127   virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
128   virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
129
130   SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
131
132 };
133 #endif