Salome HOME
MED Corba servants inherit from GenericObj in KERNEL to manage memory in heap.
authorageay <ageay>
Wed, 14 Sep 2005 05:55:03 +0000 (05:55 +0000)
committerageay <ageay>
Wed, 14 Sep 2005 05:55:03 +0000 (05:55 +0000)
idl/MED.idl
src/MEDMEM_I/MEDMEM_Field_i.cxx
src/MEDMEM_I/MEDMEM_Field_i.hxx
src/MEDMEM_I/MEDMEM_Mesh_i.cxx
src/MEDMEM_I/MEDMEM_Mesh_i.hxx
src/MEDMEM_I/MEDMEM_Support_i.cxx
src/MEDMEM_I/MEDMEM_Support_i.hxx
src/MEDMEM_I/Makefile.in

index 7b499d87baa83a813931cfe6fc35294d41a397e9..e67960245474c84504120d8f87bc287b0c7e37ce 100644 (file)
@@ -18,6 +18,7 @@ This file contains the main IDL definitions of the %MED component in %SALOME app
  study and/or give a direct access to those objects.
 */
 
+#include "SALOME_GenericObj.idl"
 #include "SALOME_Exception.idl"
 #include "SALOME_Component.idl"
 #include "SALOMEDS.idl"
@@ -134,7 +135,7 @@ This enumeration contains a set of elements defining the type of connectivity.
   // mesh interface
   // ----------------------
 
-  interface MESH : SALOME::MultiCommClass, SALOME::ServantLifeCycle {
+  interface MESH : SALOME::MultiCommClass, SALOME::GenericObj {
     // Index range begins from 1
 
     // General Informations
@@ -520,7 +521,7 @@ Internal Corba method.
   // Support interface
   // ----------------------
 
-  interface SUPPORT : SALOME::MultiCommClass, SALOME::ServantLifeCycle {
+  interface SUPPORT : SALOME::MultiCommClass, SALOME::GenericObj {
 
     /*!
       Returns the name of the support.
@@ -777,7 +778,7 @@ Internal Corba method.
   // Field interface
   //----------------
 
-  interface FIELD : SALOME::ServantLifeCycle
+  interface FIELD : SALOME::GenericObj
     {
 
       /*!
index 3014d67f8bb04bfd2f1e1b1bf8b2092fb70672ac..556e72bd18e336b684653eb25908d610a83d1a0a 100644 (file)
@@ -639,15 +639,3 @@ CORBA::Long FIELD_i::addDriver (SALOME_MED::medDriverTypes driverType,
         }
 }
 
-//=============================================================================
-/*!
- * CORBA: Destructor
-*/
-//=============================================================================
-void FIELD_i::release()
-{
-  PortableServer::ObjectId_var oid=_default_POA()->servant_to_id(this);
-  _default_POA()->deactivate_object(oid);
-  _remove_ref();
-}
-
index 32717090492b490b743a4c6683b497733ac56421..f1981ce47864adbc7ccc51fbb7ce1cf4025d6c04 100644 (file)
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
 #include "MEDMEM_Support_i.hxx"
-
 #include "MEDMEM_convert.hxx"
-
 #include "MEDMEM_Support.hxx"
 #include "MEDMEM_Field.hxx"
 
 namespace MEDMEM {
 class FIELD_i: public virtual POA_SALOME_MED::FIELD,
-              public PortableServer::RefCountServantBase
+              public SALOME::GenericObj_i
 {
 public :
         static map < int, ::MEDMEM::FIELD_ * > fieldMap ;
@@ -87,7 +85,6 @@ public :
     void        read      (CORBA::Long i) throw (SALOME::SALOME_Exception);
     void        write     (CORBA::Long i, const char* driverFieldName)
                                          throw (SALOME::SALOME_Exception);
-  void release();
     // Cuisine Interne
     MEDMEM::FIELD_ * constructConstField() const;
 
index 41ca4ba119cd1a89b7ce03b38dba7ae0a82db641..bd1115b2368008e4905c0f544f3e688988ac4792 100644 (file)
@@ -1534,15 +1534,3 @@ CORBA::Boolean MESH_i::areEquals(SALOME_MED::MESH_ptr other)
     }
   return false;
 }
-
-//=============================================================================
-/*!
- * CORBA : Servant destruction
- */
-//=============================================================================
-void MESH_i::release()
-{
-  PortableServer::ObjectId_var oid=_default_POA()->servant_to_id(this);
-  _default_POA()->deactivate_object(oid);
-  _remove_ref();
-}
index 8f1befb86bca930ef684b25ff7534504ebf04b42..1cc92b551e4199189c59b3c9a280cadb02fc0642 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <SALOMEconfig.h>
 #include "SALOMEMultiComm.hxx"
+#include "SALOME_GenericObj_i.hh"
 #include CORBA_SERVER_HEADER(MED)
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 #include CORBA_SERVER_HEADER(SALOME_Comm)
@@ -21,8 +22,8 @@
 namespace MEDMEM {
 class MESH;
 class MESH_i: public POA_SALOME_MED::MESH,
-             public PortableServer::RefCountServantBase,
-             public SALOMEMultiComm
+             public SALOMEMultiComm,
+             public SALOME::GenericObj_i
 {
 public :
     static std::map < int,::MEDMEM::MESH *> meshMap;
@@ -190,7 +191,6 @@ public:
                                   throw (SALOME::SALOME_Exception);
     CORBA::Boolean areEquals(SALOME_MED::MESH_ptr other);
 
-  void release();
 };
 }
 
index e3b90c61a61d67a846407916c4f75fdedabad0dc..a8e302c295a86777b3b2e496a69ba99f82fa4e9e 100644 (file)
@@ -712,14 +712,3 @@ void SUPPORT_i::addInStudy (SALOMEDS::Study_ptr myStudy, SALOME_MED::SUPPORT_ptr
   END_OF(LOC);
 }
 
-//=============================================================================
-/*!
- * CORBA: release <=> remote delete this
- */
-//=============================================================================
-void SUPPORT_i::release()
-{
-  PortableServer::ObjectId_var oid=_default_POA()->servant_to_id(this);
-  _default_POA()->deactivate_object(oid);
-  _remove_ref();
-}
index e7eb339634b28eba4d2d96d4be1ba7b999897bc5..5e19805af993c0ebd607ddac291729409dda145b 100644 (file)
 #include <SALOMEconfig.h>
 
 #include "SALOMEMultiComm.hxx"
+#include "SALOME_GenericObj_i.hh"
 #include CORBA_SERVER_HEADER(MED)
 #include CORBA_SERVER_HEADER(SALOME_Comm)
 
 namespace MEDMEM {
 class SUPPORT;
 
-class SUPPORT_i: public POA_SALOME_MED::SUPPORT,
-                public PortableServer::RefCountServantBase,
-               public SALOMEMultiComm
+  class SUPPORT_i: public POA_SALOME_MED::SUPPORT,
+                  public SALOMEMultiComm,
+                  public SALOME::GenericObj_i
 {
 public :
     static std::map < int,::MEDMEM::SUPPORT *> supportMap;
index b3350e4a3fad3a9cfebd751ba4bdb21acc04cd91..d29750e4964258af18bf173b5261ecfd4248808e 100644 (file)
@@ -66,7 +66,7 @@ LDFLAGSFORBIN= -L$(top_builddir)/lib/salome
 
 CPPFLAGS+= $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome
-LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -lSalomeCommunication
+LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -lSalomeCommunication -lSalomeGenericObj
 #LDFLAGS+=-lmedmem  -L. -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification
 # does we put only -lSalomeContainer and compiler retrieves -lSalomeNS -lRegistry -lOpUtil ????