From: srn Date: Thu, 12 May 2005 09:17:48 +0000 (+0000) Subject: Added empty constructor X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f6d89ef23214f5ce1c242b6490294f2691b7776;p=modules%2Fkernel.git Added empty constructor --- diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.cxx b/src/SALOMEDS/SALOMEDS_StudyManager.cxx index 640c76b99..d55eeb809 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.cxx @@ -50,6 +50,32 @@ SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManag init_orb(); } +SALOMEDS_StudyManager::SALOMEDS_StudyManager() +{ + init_orb(); + + SALOME_NamingService namingService(_orb); + CORBA::Object_var obj = namingService.Resolve( "/myStudyManager" ); + SALOMEDS::StudyManager_var theManager = SALOMEDS::StudyManager::_narrow( obj ); + ASSERT( !CORBA::is_nil(theManager) ); + +#ifdef WIN32 + long pid = (long)_getpid(); +#else + long pid = (long)getpid(); +#endif + + long addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + if(_isLocal) { + _local_impl = ((SALOMEDSImpl_StudyManager*)(addr)); + _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager); + } + else { + _local_impl = NULL; + _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager); + } +} + SALOMEDS_StudyManager::~SALOMEDS_StudyManager() { } diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.hxx b/src/SALOMEDS/SALOMEDS_StudyManager.hxx index 84ef897ca..9321d9ad6 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.hxx @@ -27,6 +27,7 @@ private: public: SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager); + SALOMEDS_StudyManager(); ~SALOMEDS_StudyManager(); virtual _PTR(Study) NewStudy(const std::string& study_name);