Salome HOME
Use a CORBA single thread model for study to avoid problems on concurrent access...
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Study_i.hxx
index 2b596f40ff54be97ca93aa6c266e80bae7c2f89c..59fed56643c5fbd007b6f4515525ae3b4dff9e1f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// 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
@@ -6,7 +6,7 @@
 // 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.
+// 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
@@ -38,6 +38,7 @@
 #include <stdio.h>
 
 //SALOMEDS headers
+#include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_SComponentIterator_i.hxx"
 #include "SALOMEDS_StudyBuilder_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
@@ -46,8 +47,6 @@
 #include "SALOMEDSImpl_Study.hxx"
 #include "SALOMEDSImpl_AttributeIOR.hxx"
 
-class Notifier;
-
 class Standard_EXPORT SALOMEDS_Study_i: public POA_SALOMEDS::Study
 {
 private:
@@ -55,7 +54,9 @@ private:
   SALOMEDSImpl_Study*            _impl;  
   SALOMEDS_StudyBuilder_i*       _builder;    
   static std::map<SALOMEDSImpl_Study*, SALOMEDS_Study_i*> _mapOfStudies;
-  Notifier*                      _notifier;
+  SALOMEDSImpl_AbstractCallback* _notifier;
+  SALOMEDSImpl_AbstractCallback* _genObjRegister;
+  bool                           _closed;
 
 public:
 
@@ -64,6 +65,8 @@ public:
   
   //! standard destructor
   virtual ~SALOMEDS_Study_i(); 
+
+  virtual PortableServer::POA_ptr _default_POA();
   
   //! method to Get persistent reference of study (idem URL())
   /*!
@@ -277,17 +280,10 @@ public:
 
   virtual void AddCreatedPostponed(const char* theIOR);
 
-#ifndef WIN32
-  virtual void RemovePostponed(const CORBA::Long theUndoLimit); // removes postponed IORs of old transaction
-                                                        // if theUndoLimit==0, removes all
-  virtual void UndoPostponed(const CORBA::Long theWay); // theWay = 1: resurrect objects,
-                                                // theWay = -1: get back to the list of postponed
-#else
   virtual void RemovePostponed(CORBA::Long theUndoLimit); // removes postponed IORs of old transaction
                                                         // if theUndoLimit==0, removes all
   virtual void UndoPostponed(CORBA::Long theWay); // theWay = 1: resurrect objects,
                                                 // theWay = -1: get back to the list of postponed
-#endif
 
   virtual SALOMEDS::AttributeParameter_ptr GetCommonParameters(const char* theID, CORBA::Long theSavePoint);
   virtual SALOMEDS::AttributeParameter_ptr GetModuleParameters(const char* theID, 
@@ -352,6 +348,6 @@ public:
   virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
 
   virtual void attach(SALOMEDS::Observer_ptr theObs, CORBA::Boolean modify);
-
+  virtual void detach(SALOMEDS::Observer_ptr theObs);
 };
 #endif