_orb = None
_poa = None
_numInstance = 0
+ _listInstances_map = {}
#-------------------------------------------------------------------------
MESSAGE( "SALOME_Container_i::create_component_instance : OK")
comp_o = comp_i._this()
+ self._listInstances_map[instanceName] = comp_i
except:
import traceback
traceback.print_exc()
#-------------------------------------------------------------------------
+ def find_component_instance(self, registeredName, studyId):
+ anEngine = None
+ keysList = self._listInstances_map.keys()
+ i = 0
+ while i < len(keysList):
+ instance = keysList[i]
+ if find(instance,registeredName) == 0:
+ anEngine = self._listInstances_map[instance]
+ if studyId == anEngine.getStudyId():
+ return anEngine._this()
+ i = i + 1
+ return anEngine._this()
+
+
+ #-------------------------------------------------------------------------
+
def remove_impl(self, component):
MESSAGE( "SALOME_ContainerPy_i::remove_impl" )
- return None
+ instanceName = component._get_instanceName()
+ MESSAGE( "unload component " + str(instanceName) )
+ self._listInstances_map.remove(instanceName)
+ component.destroy()
+ self._naming_service.Destroy_Name(str(instanceName))
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
def ping(self):
- MESSAGE( "SALOME_ContainerPy_i::ping" )
+ MESSAGE( "SALOME_ContainerPy_i::ping() pid " + str(os.getpid()) )
return None
#-------------------------------------------------------------------------
+ def getPID(self):
+ return os.getpid()
+
+ #-------------------------------------------------------------------------
+
def _get_name(self):
MESSAGE( "SALOME_ContainerPy_i::_get_name" )
return self._containerName
#-------------------------------------------------------------------------
+ def getHostName(self):
+ MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" )
+ self._machineName = "localhost"
+ return self._machineName
+
+ #-------------------------------------------------------------------------
+
def _get_machineName(self):
MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" )
self._machineName = "localhost"