${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
${CMAKE_CURRENT_SOURCE_DIR}/../DF
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
${CMAKE_BINARY_DIR}
)
# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
# This local variable defines the list of dependant libraries common to all target in this package.
SET(COMMON_LIBS
SALOMEBasics
SalomeHDFPersist
DF
- SalomeGenericObj
- SalomeIDLKernel
${HDF5_LIBS}
)
ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES})
SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${PLATFORM_LIBS})
INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
ADD_EXECUTABLE(testDS testDS.cxx)
SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${PLATFORM_LIBS})
INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-I$(srcdir)/../SALOMELocalTrace \
-I$(srcdir)/../HDFPersist \
-I$(srcdir)/../DF \
- -I$(srcdir)/../GenericObj \
- -I$(top_builddir)/idl \
-I$(top_builddir) \
@HDF5_INCLUDES@ \
- @BOOST_CPPFLAGS@ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+ @BOOST_CPPFLAGS@
# This local variable defines the list of dependant libraries common to all target in this package.
COMMON_LIBS =\
../Basics/libSALOMEBasics.la \
../HDFPersist/libSalomeHDFPersist.la \
../DF/libDF.la \
- ../GenericObj/libSalomeGenericObj.la \
- $(top_builddir)/idl/libSalomeIDLKernel.la \
@HDF5_LIBS@
libSalomeDSImpl_la_CPPFLAGS = $(COMMON_CPPFLAGS)
libSalomeDSImpl_la_LDFLAGS = -no-undefined -version-info=0:0:0
-libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) $(CORBA_LIBS)
+libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS)
#
# ===============================================================
# Executables targets
# ===============================================================
#
-bin_PROGRAMS = testDS
+bin_PROGRAMS = testDS
testDS_SOURCES = testDS.cxx
testDS_CPPFLAGS = $(COMMON_CPPFLAGS)
-testDS_LDADD = libSalomeDSImpl.la ../DF/libDF.la \
- $(COMMON_LIBS) $(CORBA_LIBS)
+testDS_LDADD = libSalomeDSImpl.la ../DF/libDF.la $(COMMON_LIBS)
#include "SALOMEDSImpl_AttributeIOR.hxx"
#include "SALOMEDSImpl_Study.hxx"
-//to disable automatic genericobj management comment the following line
-#define WITHGENERICOBJ
-
-#ifdef WITHGENERICOBJ
-#include "SALOME_GenericObj_i.hh"
-
-static CORBA::ORB_var getORB()
-{
- int argc=0;
- return CORBA::ORB_init(argc,0);
-}
-
-void IORGenericObjDecref(const std::string& anIOR)
-{
- if(anIOR=="")return;
- CORBA::Object_var obj;
- SALOME::GenericObj_var gobj;
- try
- {
- obj = getORB()->string_to_object(anIOR.c_str());
- if(obj->_non_existent())return;
- gobj = SALOME::GenericObj::_narrow(obj);
- if(! CORBA::is_nil(gobj) )
- {
- gobj->UnRegister();
- }
- }
- catch(const CORBA::Exception& e)
- {
- }
-}
-
-void IORGenericObjIncref(const std::string& anIOR)
-{
- CORBA::Object_var obj;
- SALOME::GenericObj_var gobj;
- try
- {
- obj = getORB()->string_to_object(anIOR.c_str());
- if(obj->_non_existent())return;
- gobj = SALOME::GenericObj::_narrow(obj);
- if(! CORBA::is_nil(gobj) )
- {
- gobj->Register();
- }
- }
- catch(const CORBA::Exception& e)
- {
- }
-}
-#else
-void IORGenericObjDecref(const std::string& anIOR)
-{}
-void IORGenericObjIncref(const std::string& anIOR)
-{}
-#endif
-
//=======================================================================
//function : GetID
//purpose :
return SALOMEDSImpl_AttributeIORID;
}
-
-
//=======================================================================
//function : Set
//purpose :
//=======================================================================
-SALOMEDSImpl_AttributeIOR* SALOMEDSImpl_AttributeIOR::Set (const DF_Label& L,
+SALOMEDSImpl_AttributeIOR* SALOMEDSImpl_AttributeIOR::Set (const DF_Label& L,
const std::string& S)
{
SALOMEDSImpl_AttributeIOR* A = NULL;
{
CheckLocked();
- SALOMEDSImpl_Study* study=SALOMEDSImpl_Study::GetStudy(Label());
-
Backup();
//remove IOR entry in study
if(theValue != myString)
{
- IORGenericObjIncref(theValue);
- IORGenericObjDecref(myString);
+ SALOMEDSImpl_Study* study=SALOMEDSImpl_Study::GetStudy(Label());
+ study->RegisterGenObj(theValue, Label());
+ study->UnRegisterGenObj(myString, Label());
study->DeleteIORLabelMapItem(myString);
}
SALOMEDSImpl_AttributeIOR::~SALOMEDSImpl_AttributeIOR()
{
- IORGenericObjDecref(myString);
+ SALOMEDSImpl_Study::UnRegisterGenObj(myString, Label());
}
//=======================================================================