]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Added empty constructor
authorsrn <srn@opencascade.com>
Thu, 12 May 2005 09:17:48 +0000 (09:17 +0000)
committersrn <srn@opencascade.com>
Thu, 12 May 2005 09:17:48 +0000 (09:17 +0000)
src/SALOMEDS/SALOMEDS_StudyManager.cxx
src/SALOMEDS/SALOMEDS_StudyManager.hxx

index 640c76b99b12410fefc8ba695e21dcad915d0041..d55eeb80987503d17e1530764d4452aea58da18c 100644 (file)
@@ -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()
 {
 }
index 84ef897cad80815355841e168709025f4df8e90d..9321d9ad6f8ff687f8e86b24fd63ae9e9a2a82c9 100644 (file)
@@ -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);