Salome HOME
Merge V9_dev branch into master
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyBuilder_i.hxx
index fcad36f063ee4a8909bd097f9958b2b8a5a10b30..cfaee100ef2d6d46accae6d07ec5d039d11fdc96 100644 (file)
@@ -1,50 +1,55 @@
-//  File      : SALOMEDS_StudyBuilder_i.hxx
-//  Created   : Wed Nov 28 16:26:50 2001
-//  Author    : Yves FRICAUD
-
-//  Project   : SALOME
-//  Module    : SALOMEDS
-//  Copyright : Open CASCADE 2001
-//  $Header$
-
-#ifndef __SALOMEDS_STUDYBUIlDER_I_H__
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  File   : SALOMEDS_StudyBuilder_i.hxx
+//  Author : Sergey RUIN
+//  Module : SALOME
+//
+#ifndef __SALOMEDS_STUDYBUILDER_I_H__
 #define __SALOMEDS_STUDYBUILDER_I_H__
 
-
 // std C++ headers
-#include <iostream.h>
+#include <iostream>
 
 // IDL headers
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOMEDS)
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
-#include "SALOMEDS_AttributeComment_i.hxx"
-#include "SALOMEDS_AttributePersistentRef_i.hxx"
-#include "SALOMEDS_AttributeIOR_i.hxx"
-#include "SALOMEDS_AttributeReal_i.hxx"
-#include "SALOMEDS_AttributeInteger_i.hxx"
-#include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
-#include "SALOMEDS_AttributeName_i.hxx"
-#include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
-#include "SALOMEDS_Callback_i.hxx"
-
-// Cascade header
-#include <TDocStd_Document.hxx>
-
-class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder,
-                         public PortableServer::RefCountServantBase {
+#include "SALOMEDSImpl_StudyBuilder.hxx"
+
+class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
+{
 private:
-  CORBA::ORB_ptr           _orb;
-  Handle(TDocStd_Document) _doc;  // OCAF Document
-  SALOMEDS::Callback_var   _callbackOnAdd;
-  SALOMEDS::Callback_var   _callbackOnRemove;
+  CORBA::ORB_var                    _orb;
+  SALOMEDSImpl_StudyBuilder*        _impl;  
 public:
     
-  SALOMEDS_StudyBuilder_i(const Handle(TDocStd_Document), CORBA::ORB_ptr);
+  SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder*, CORBA::ORB_ptr);
 
   ~SALOMEDS_StudyBuilder_i();
 
+  virtual PortableServer::POA_ptr _default_POA();
+
   //! NewComponent
   /*!
     \param ComponentDataType    
@@ -55,7 +60,7 @@ public:
   //! DefineComponentInstance
   /*!
     \param SComponent_ptr       
-    \param ComponentIOR        
+    \param ComponentIOR 
   */
   virtual void DefineComponentInstance (SALOMEDS::SComponent_ptr, CORBA::Object_ptr ComponentIOR);
   
@@ -63,7 +68,7 @@ public:
   /*!
     <long-description>
 
-    \param aComponent  
+    \param aComponent   
   */
   virtual void RemoveComponent(SALOMEDS::SComponent_ptr aComponent);
 
@@ -85,11 +90,6 @@ public:
   */
   virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
 
-  /*!
-    The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used)
-  */
-  virtual void AddDirectory(const char* thePath);
-
   virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
     throw(SALOME::SALOME_Exception);
   virtual void Load(SALOMEDS::SObject_ptr sco);
@@ -103,6 +103,8 @@ public:
 
   virtual void Addreference(SALOMEDS::SObject_ptr me, SALOMEDS::SObject_ptr thereferencedObject);
 
+  virtual void RemoveReference(SALOMEDS::SObject_ptr me);
+
   virtual void SetGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
   virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
 
@@ -119,7 +121,13 @@ public:
   virtual CORBA::Long UndoLimit();
   virtual void UndoLimit(CORBA::Long);
 
-  virtual SALOMEDS::Callback_ptr SetOnAddSObject(SALOMEDS::Callback_ptr theCallback);
-  virtual SALOMEDS::Callback_ptr SetOnRemoveSObject(SALOMEDS::Callback_ptr theCallback);
+  void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
+
+  virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
+  virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
+  virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
+
+  SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
+
 };
 #endif