]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
1. SALOME::GenericObj : Destroy() -> UnRegister()
authorvsr <vsr@opencascade.com>
Fri, 4 Mar 2011 15:00:41 +0000 (15:00 +0000)
committervsr <vsr@opencascade.com>
Fri, 4 Mar 2011 15:00:41 +0000 (15:00 +0000)
2. Introduce interfaces ExportableObject and ImportableComponent interfaces
3. Inherit fileTransfer from SALOME::GenericObj

24 files changed:
src/Container/Makefile.am
src/Container/SALOME_FileTransfer_i.hxx
src/Container/SALOME_PyNode.py
src/DSC/DSC_Basic/Makefile.am
src/DSC/DSC_Python/Makefile.am
src/DSC/DSC_User/Basic/Makefile.am
src/DSC/DSC_User/Datastream/Calcium/Makefile.am
src/DSC/DSC_User/Datastream/Palm/Makefile.am
src/DSC/DSC_User/Makefile.am
src/GenericObj/SALOME_GenericObj_i.cc
src/GenericObj/SALOME_GenericObj_i.hh
src/KERNEL_PY/salome_genericobj.py
src/LifeCycleCORBA/Makefile.am
src/MPIContainer/Makefile.am
src/SALOMEDS/SALOMEDS_ChildIterator.cxx
src/SALOMEDS/SALOMEDS_Driver_i.cxx
src/SALOMEDS/SALOMEDS_GenericAttribute.cxx
src/SALOMEDS/SALOMEDS_SComponentIterator.cxx
src/SALOMEDS/SALOMEDS_SObject.cxx
src/SALOMEDS/SALOMEDS_Study_i.cxx
src/SALOMEDS/SALOMEDS_UseCaseBuilder.cxx
src/SALOMEDS/SALOMEDS_UseCaseIterator.cxx
src/TestContainer/Makefile.am
src/TestMPIContainer/Makefile.am

index fdffc037ccccfab89641f00ba2808ef8ddaea0a1..349274422f3c2184cee525c7ecd32bb71c5f0088 100644 (file)
@@ -47,7 +47,7 @@ salomeinclude_HEADERS = \
 # Scripts to be installed
 dist_salomescript_PYTHON =\
        SALOME_ComponentPy.py \
-  SALOME_PyNode.py \
+       SALOME_PyNode.py \
        SALOME_Container.py
 
 # These files are executable scripts
@@ -72,6 +72,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/../Notification \
        -I$(srcdir)/../ResourcesManager \
        -I$(srcdir)/../HDFPersist \
+       -I$(srcdir)/../GenericObj \
        -I$(top_builddir)/idl \
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@
 
@@ -86,6 +87,7 @@ COMMON_LIBS =\
        ../SALOMELocalTrace/libSALOMELocalTrace.la \
        ../Basics/libSALOMEBasics.la \
        ../HDFPersist/libSalomeHDFPersist.la \
+       ../GenericObj/libSalomeGenericObj.la \
        $(top_builddir)/idl/libSalomeIDLKernel.la \
        @CORBA_LIBS@ \
        $(PYTHON_LIBS)
index 8b599f6635fba278eeddbaea35721dccac99c880..624b7524393e3e95edbbcbc1a6f927d335c8e53a 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "SALOME_Container.hxx"
 
+#include "SALOME_GenericObj_i.hh"
+
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Component)
 #include <map>
@@ -37,7 +39,8 @@
 
 class CONTAINER_EXPORT fileTransfer_i:
   public virtual POA_Engines::fileTransfer,
-  public virtual PortableServer::ServantBase
+  public virtual PortableServer::ServantBase,
+  public virtual SALOME::GenericObj_i
 {
 public:
   fileTransfer_i();
index d0f8f527390ff443043991c8a419c984a8257cd1..d501223df154bff1d6296cc85a2521939b5d301c 100644 (file)
@@ -40,7 +40,7 @@ class Generic(SALOME__POA.GenericObj):
   def Register(self):
     self.cnt+=1
 
-  def Destroy(self):
+  def UnRegister(self):
     self.cnt-=1
     if self.cnt <= 0:
       oid=self.poa.servant_to_id(self)
index c584eff3c94adcfe1ebc597eebe0a5b63161dfe0..789063e65f5056e67fa4cfa26b93b7c2482941fc 100644 (file)
@@ -46,6 +46,7 @@ salomeinclude_HEADERS = ConnectionManager_i.hxx \
 
 # This local variable defines the list of CPPFLAGS common to all target in this package.
 COMMON_CPPFLAGS= -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_srcdir)/src/SALOMELocalTrace \
                 -I$(top_srcdir)/src/Basics \
index fc96419a9068691f48be4cea5245e269e939fcb0..068b356996f26e250db97474706c92a34d1dd0b3 100644 (file)
@@ -42,6 +42,7 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \
                 -I$(top_srcdir)/src/Basics \
                 -I$(top_srcdir)/src/Utils \
                 -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_builddir)/idl \
                 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@
index def7af510a0f65e9083ac832355c8680c67c2fec..c6c5534cf43c17c196680c7751699e0eef34f96a 100644 (file)
@@ -47,6 +47,7 @@ COMMON_CPPFLAGS= -I$(top_builddir)/idl \
                 -I$(top_srcdir)/src/DSC/DSC_Basic \
                 -I$(top_srcdir)/src/DSC/DSC_User \
                 -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_srcdir)/src/SALOMELocalTrace \
                 -I$(top_srcdir)/src/Basics \
index ffcbce1dfd31b8a3c41f92c037e8e454a0a80845..0760bb29a145ef0291328ee565c04a45dab6cbf6 100644 (file)
@@ -89,6 +89,7 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \
                 -I$(top_srcdir)/src/Basics \
                 -I$(top_srcdir)/src/Utils \
                 -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_builddir)/idl \
                 -I$(top_builddir)/src/DSC/DSC_User/Datastream/Calcium \
index 0ab71953e0bf414d481edcef7ec132282fb70953..f74cd82a8b622a8d94d585ae4b887bc736fa3ae5 100644 (file)
@@ -48,6 +48,7 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \
                 -I$(top_srcdir)/src/DSC/DSC_User/Datastream \
                 -I$(top_srcdir)/src/DSC/DSC_Basic \
                 -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_srcdir)/src/SALOMELocalTrace \
                 -I$(top_srcdir)/src/Basics \
index b31e6b3fc0a1cc76b300708a380c087765c480af..7c41933385f3c3d27636b2b02adfd8a6470fb8d8 100644 (file)
@@ -48,6 +48,7 @@ salomeinclude_HEADERS = base_port.hxx \
 # This local variable defines the list of CPPFLAGS common to all target in this package.
 COMMON_CPPFLAGS= \
                 -I$(top_srcdir)/src/Container \
+                -I$(top_srcdir)/src/GenericObj \
                 -I$(top_srcdir)/src/Notification \
                 -I$(top_srcdir)/src/DSC/DSC_Basic \
                 -I$(top_srcdir)/src/SALOMELocalTrace \
index 1e41fbcb00ff1dd5f782ca02757bae1c96e8a292..0f0ad93ba3d337ba9bab03dc5bbf129abdf704ed 100644 (file)
@@ -63,9 +63,9 @@ void GenericObj_i::Register(){
 }
 
 
-void GenericObj_i::Destroy(){
+void GenericObj_i::UnRegister(){
   if(MYDEBUG)
-    MESSAGE("GenericObj_i::Destroy "<<this<<"; myRefCounter = "<<myRefCounter)
+    MESSAGE("GenericObj_i::UnRegister "<<this<<"; myRefCounter = "<<myRefCounter)
   if(--myRefCounter <= 0){
     PortableServer::ObjectId_var anObjectId = myPOA->servant_to_id(this);
     myPOA->deactivate_object(anObjectId.in());
index d1b1994bc9488eef8e27fc80e6cf26fce898eba0..6d7657726b425d853bd7c22ba0645a15fba0c946 100644 (file)
@@ -64,7 +64,7 @@ namespace SALOME{
     /*! Increase the reference count (mark as used by another object).*/
     virtual void Register();
     /*! Decrease the reference count (release by another object).*/
-    virtual void Destroy();
+    virtual void UnRegister();
   };
 };
 
index 4acdc43f047438a7a3d7277239d7dd02618656c7..d307ed1a0c6dbe767e0761c222920ca272a79982 100644 (file)
@@ -31,7 +31,7 @@ import omniORB
 import SALOME
 
 def mydel(self):
-    self.Destroy()
+    self.UnRegister()
     omniORB.CORBA.Object.__del__(self)
 
 def mysetattr(self,attr,value):
index c72a6b4a649010a8bf672909f7da41d33163b04c..5bfd5b126ae9f6eb922bae3a996a690513328e75 100644 (file)
@@ -55,6 +55,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/../SALOMETraceCollector \
        -I$(srcdir)/../NamingService \
        -I$(srcdir)/../Utils \
+       -I$(srcdir)/../GenericObj \
        -I$(srcdir)/../Container \
        -I$(srcdir)/../ResourcesManager \
        -I$(top_builddir)/idl \
@@ -68,6 +69,7 @@ COMMON_LIBS =\
        ../Utils/libOpUtil.la \
        ../SALOMELocalTrace/libSALOMELocalTrace.la \
        ../Basics/libSALOMEBasics.la \
+       ../GenericObj/libSalomeGenericObj.la \
        $(top_builddir)/idl/libSalomeIDLKernel.la
 
 #
index d8a35f1dc332e1d954c127df0b56bb0fcfaf8a64..50b8183cdf7c5eda21a5e634da98e7c54baa2da8 100644 (file)
@@ -61,6 +61,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/../Notification \
        -I$(srcdir)/../ResourcesManager \
        -I$(srcdir)/../Container \
+       -I$(srcdir)/../GenericObj \
        -I$(top_builddir)/idl \
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
 
@@ -74,6 +75,7 @@ COMMON_LIBS =\
        ../SALOMELocalTrace/libSALOMELocalTrace.la \
        ../Basics/libSALOMEBasics.la \
        ../Container/libSalomeContainer.la \
+       ../GenericObj/libSalomeGenericObj.la \
        $(top_builddir)/idl/libSalomeIDLKernel.la\
        @CORBA_LIBS@
 
index dd4a0a2bcf2305031e50d7c0a8a5ff9a659dd102..16d7892fc9794177f3a69b8bf081e45692966d7b 100644 (file)
@@ -45,7 +45,7 @@ SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(SALOMEDS::ChildIterator_ptr theIt
 
 SALOMEDS_ChildIterator::~SALOMEDS_ChildIterator()
 {
-  if(!_isLocal) _corba_impl->Destroy(); 
+  if(!_isLocal) _corba_impl->UnRegister(); 
   else if(_local_impl) delete _local_impl;
 }
 
index e4607be4bebc4a6456a58d77d8daab9572ddc219..7d845471c1869e1203f4a16c501c333a33aaed52 100644 (file)
@@ -158,7 +158,7 @@ bool SALOMEDS_Driver_i::CanCopy(const SALOMEDSImpl_SObject& theObject)
 
   SALOMEDS::unlock();
   bool isOk = _driver->CanCopy(so.in());
-  so->Destroy();
+  so->UnRegister();
   SALOMEDS::lock();
 
   return isOk;
index 2f9ad0777b56c8bdbaf3ce74f9e3b60d74927b40..f209f0242d76dc11cdaece2de921961c20f2753a 100644 (file)
@@ -70,7 +70,7 @@ SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDS::GenericAttribute_
 SALOMEDS_GenericAttribute::~SALOMEDS_GenericAttribute() 
 {
   if (!_isLocal) {
-    _corba_impl->Destroy();
+    _corba_impl->UnRegister();
   }
 }
 
index 2598aa400d37ebd6ebdd9eb119e456ff145a21f4..724ded4b20c365cfa0cea4a2461e03e340237be6 100644 (file)
@@ -45,7 +45,7 @@ SALOMEDS_SComponentIterator::SALOMEDS_SComponentIterator(SALOMEDS::SComponentIte
 
 SALOMEDS_SComponentIterator::~SALOMEDS_SComponentIterator()
 {
-  if(!_isLocal) _corba_impl->Destroy(); 
+  if(!_isLocal) _corba_impl->UnRegister(); 
   else if(_local_impl) delete _local_impl;
 }
 
index 1c87909faccc8e21c0282bf8107a323045d19cd9..4d9a2a1654740d4716c090c281e054368da512ed 100644 (file)
@@ -96,7 +96,7 @@ SALOMEDS_SObject::SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject)
 SALOMEDS_SObject::~SALOMEDS_SObject()
 {
   if (!_isLocal) {
-    _corba_impl->Destroy();
+    _corba_impl->UnRegister();
   }
   else {
     if(_local_impl) delete _local_impl;
index 9bee45f3279e065e7100d6b49ea0020b1211d68f..4213401ae5253272a7b427fd46a0b92e23df6710 100644 (file)
@@ -793,11 +793,11 @@ void SALOMEDS_Study_i::Close()
       catch (CORBA::Exception&) 
         {/*pass*/ }
     }
-    sco->Destroy();
+    sco->UnRegister();
   }
 
   //Does not need any more this iterator
-  itcomponent->Destroy();
+  itcomponent->UnRegister();
 
 
   _impl->Close();
@@ -842,8 +842,8 @@ void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/)
       SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj);
          //rnv: To avoid double deletion of the Salome Generic Objects:
          //rnv: 1. First decrement of the reference count in the SALOMEDSImpl_AttributeIOR::~SALOMEDSImpl_AttributeIOR();
-         //rnv: 2. Second decrement of the reference count in the next string : aGeneric->Destroy();
-      //if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
+         //rnv: 2. Second decrement of the reference count in the next string : aGeneric->UnRegister();
+      //if (!CORBA::is_nil(aGeneric)) aGeneric->UnRegister();
     } catch (...) {}
   }
 
index e7ab7f6958fd24a519c86dd11789d3b32c3ce6e7..f3fbb4c17654c46b5817cda1d4af4f512b68a7b7 100644 (file)
@@ -51,7 +51,7 @@ SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(SALOMEDS::UseCaseBuilder_ptr th
 
 SALOMEDS_UseCaseBuilder::~SALOMEDS_UseCaseBuilder()
 {
-  if(!_isLocal) _corba_impl->Destroy(); 
+  if(!_isLocal) _corba_impl->UnRegister(); 
 }  
 
 bool SALOMEDS_UseCaseBuilder::Append(const _PTR(SObject)& theObject)
index c0db43674b4f9d019d6a5ed41b0708b73e0806ed..a089cd8c794ac928a8c804fec7c61d0b9733371b 100644 (file)
@@ -44,7 +44,7 @@ SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(SALOMEDS::UseCaseIterator_ptr
 
 SALOMEDS_UseCaseIterator::~SALOMEDS_UseCaseIterator()
 {
-  if(!_isLocal) _corba_impl->Destroy();    
+  if(!_isLocal) _corba_impl->UnRegister();    
   else if(_local_impl) delete _local_impl;
 }
 
index 5d2434d14075819e19287898bb3918d853439abf..ce4e82d987452e812378725402859f8b931d44d8 100644 (file)
@@ -55,6 +55,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/../Registry \
        -I$(srcdir)/../Notification \
        -I$(srcdir)/../ResourcesManager \
+       -I$(srcdir)/../GenericObj \
        -I$(srcdir)/../Container \
        -I$(top_builddir)/idl \
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
@@ -70,6 +71,7 @@ COMMON_LIBS =\
        ../Utils/libOpUtil.la \
        ../SALOMELocalTrace/libSALOMELocalTrace.la \
        ../Basics/libSALOMEBasics.la \
+       ../GenericObj/libSalomeGenericObj.la \
        $(top_builddir)/idl/libSalomeIDLKernel.la
 
 #
index 1a6bd7e0dbca476791b90abe1c48ba8e3e9fd901..efd8ab3185eac02979e434d943333ecfaf5ea012 100644 (file)
@@ -59,6 +59,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/../ResourcesManager \
        -I$(srcdir)/../Container \
        -I$(srcdir)/../MPIContainer \
+       -I$(srcdir)/../GenericObj \
        -I$(top_builddir)/idl \
        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
 
@@ -73,6 +74,7 @@ COMMON_LIBS =\
        ../Basics/libSALOMEBasics.la \
        ../Container/libSalomeContainer.la \
        ../MPIContainer/libSalomeMPIContainer.la \
+       ../GenericObj/libSalomeGenericObj.la \
        $(top_builddir)/idl/libSalomeIDLKernel.la\
        @CORBA_LIBS@