Salome HOME
Merge changes from 'master' branch.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyBuilder_i.hxx
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, 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_i.hxx
24 //  Author : Sergey RUIN
25 //  Module : SALOME
26 //
27 #ifndef __SALOMEDS_STUDYBUILDER_I_H__
28 #define __SALOMEDS_STUDYBUILDER_I_H__
29
30 // std C++ headers
31 #include <iostream>
32
33 // IDL headers
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOMEDS)
36 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
37
38 #include "SALOMEDSImpl_StudyBuilder.hxx"
39
40 class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
41 {
42 private:
43   CORBA::ORB_var                    _orb;
44   SALOMEDSImpl_StudyBuilder*        _impl;  
45 public:
46     
47   SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder*, CORBA::ORB_ptr);
48
49   ~SALOMEDS_StudyBuilder_i();
50
51   //! NewComponent
52   /*!
53     \param ComponentDataType    
54     \return <ReturnValue>
55   */
56   virtual SALOMEDS::SComponent_ptr NewComponent(const char* ComponentDataType);
57
58   //! DefineComponentInstance
59   /*!
60     \param SComponent_ptr       
61     \param ComponentIOR 
62   */
63   virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
64   
65   //! 
66   /*!
67     <long-description>
68
69     \param aComponent   
70   */
71   virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
72
73   //! 
74   /*!
75     <long-description>
76
77     \param theFatherObject      
78     \return <ReturnValue>
79   */
80   virtual SALOMEDS::SObject_ptr NewObject(SALOMEDS::SObject_ptr theFatherObject);
81   //! 
82   /*!
83     <long-description>
84
85     \param theFatherObject      
86     \param atag 
87     \return <ReturnValue>
88   */
89   virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
90
91   virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
92     throw(SALOME::SALOME_Exception);
93   virtual void Load(SALOMEDS::SObject_ptr sco);
94
95   virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
96   virtual void RemoveObjectWithChildren(SALOMEDS::SObject_ptr anObject);
97
98   virtual SALOMEDS::GenericAttribute_ptr FindOrCreateAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
99   virtual CORBA::Boolean FindAttribute(SALOMEDS::SObject_ptr anObject, SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
100   virtual void RemoveAttribute(SALOMEDS::SObject_ptr anObject, const char* aTypeOfAttribute);
101
102   virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
103
104   virtual void RemoveReference(SALOMEDS::SObject_ptr me);
105
106   virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
107   virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
108
109   virtual void NewCommand();
110   virtual void CommitCommand() throw(SALOMEDS::StudyBuilder::LockProtection);
111   virtual CORBA::Boolean HasOpenCommand();
112   virtual void AbortCommand();
113   virtual void Undo() throw(SALOMEDS::StudyBuilder::LockProtection);
114   virtual void Redo() throw(SALOMEDS::StudyBuilder::LockProtection);
115   CORBA::Boolean GetAvailableUndos();
116   CORBA::Boolean GetAvailableRedos();
117   CORBA::Boolean IsSaved();
118   CORBA::Boolean IsModified();
119   virtual CORBA::Long UndoLimit();
120   virtual void UndoLimit(CORBA::Long);
121
122   void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
123
124   virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
125   virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
126   virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
127
128   SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
129
130 };
131 #endif