]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
new method BeforeDeactivate() for custom actions before servant deactivation
authorasl <asl@opencascade.com>
Tue, 15 Dec 2009 13:16:12 +0000 (13:16 +0000)
committerasl <asl@opencascade.com>
Tue, 15 Dec 2009 13:16:12 +0000 (13:16 +0000)
src/GenericObj/SALOME_GenericObj_i.cc
src/GenericObj/SALOME_GenericObj_i.hh

index bee7e62cff4143e3c1e66b0d0ebf8113e55c5ab5..8545c74d5af48413bcfb5a7f701b5339c3173dfd 100644 (file)
@@ -68,7 +68,12 @@ void GenericObj_i::Destroy(){
     MESSAGE("GenericObj_i::Destroy "<<this<<"; myRefCounter = "<<myRefCounter)
   if(--myRefCounter <= 0){
     PortableServer::ObjectId_var anObjectId = myPOA->servant_to_id(this);
+    BeforeDeactivate();
     myPOA->deactivate_object(anObjectId.in());
     _remove_ref();
   }
 }
+
+void GenericObj_i::BeforeDeactivate()
+{
+}
index a7f03c893d117ec829aa03865fa7cb7f1e6c13fc..96bbcf2e08f6a901c24714630dccecc3f2bd4f27 100644 (file)
@@ -54,11 +54,15 @@ namespace SALOME{
     GenericObj_i(PortableServer::POA_ptr thePOA = PortableServer::POA::_nil());
     // The function is used implicetly in "_this" function
     virtual PortableServer::POA_ptr _default_POA();
+
   public: // Follow functions is IDL defined
     /*! Increase the reference count (mark as used by another object).*/
     virtual void Register();
     /*! Decrease the reference count (release by another object).*/
     virtual void Destroy();
+
+  protected:
+    virtual void BeforeDeactivate();
   };
 };