1 // File : SALOMEDS_StudyBuilder_i.hxx
2 // Created : Wed Nov 28 16:26:50 2001
3 // Author : Yves FRICAUD
7 // Copyright : Open CASCADE 2001
10 #ifndef __SALOMEDS_STUDYBUIlDER_I_H__
11 #define __SALOMEDS_STUDYBUILDER_I_H__
18 #include <SALOMEconfig.h>
19 #include CORBA_SERVER_HEADER(SALOMEDS)
20 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
22 #include "SALOMEDS_AttributeComment_i.hxx"
23 #include "SALOMEDS_AttributePersistentRef_i.hxx"
24 #include "SALOMEDS_AttributeIOR_i.hxx"
25 #include "SALOMEDS_AttributeReal_i.hxx"
26 #include "SALOMEDS_AttributeInteger_i.hxx"
27 #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
28 #include "SALOMEDS_AttributeName_i.hxx"
29 #include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
30 #include "SALOMEDS_Callback_i.hxx"
33 #include <TDocStd_Document.hxx>
35 class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder,
36 public PortableServer::RefCountServantBase {
39 Handle(TDocStd_Document) _doc; // OCAF Document
40 SALOMEDS::Callback_var _callbackOnAdd;
41 SALOMEDS::Callback_var _callbackOnRemove;
44 SALOMEDS_StudyBuilder_i(const Handle(TDocStd_Document), CORBA::ORB_ptr);
46 ~SALOMEDS_StudyBuilder_i();
50 \param ComponentDataType
53 virtual SALOMEDS::SComponent_ptr NewComponent(const char* ComponentDataType);
55 //! DefineComponentInstance
60 virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
68 virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
74 \param theFatherObject
77 virtual SALOMEDS::SObject_ptr NewObject(SALOMEDS::SObject_ptr theFatherObject);
82 \param theFatherObject
86 virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
89 The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used)
91 virtual void AddDirectory(const char* thePath);
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);
97 virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
98 virtual void RemoveObjectWithChildren(SALOMEDS::SObject_ptr anObject);
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);
104 virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
106 virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
107 virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
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);
122 virtual SALOMEDS::Callback_ptr SetOnAddSObject(SALOMEDS::Callback_ptr theCallback);
123 virtual SALOMEDS::Callback_ptr SetOnRemoveSObject(SALOMEDS::Callback_ptr theCallback);