{
interface Component ;
- enum ContainerType { UndefinedContainerType , CppContainer , PythonContainer } ;
-
/*! \brief Interface of the %Container
This interface defines the process of loading and registration
interface Container ;
- typedef sequence<Container> ListOfContainers ;
-
- typedef sequence<Component> ListOfComponents ;
-
interface Container
{
- void destroy() ;
/*!
Initializes the %container with a definite name.
\param ContainerName Name of the container
\return an initialized container
*/
- Container start_impl( in string ContainerName , in Engines::ContainerType aContainerType ) ;
+ Container start_impl( in string ContainerName ) ;
/*!
Loads into the container a new component, registers it and starts it's CORBA servant.
*/
void ping();
-/*!
- Determines whether the type of container (C++ or Python).
-*/
-
- Engines::ContainerType type();
/*!
Name of the %container
*/
#-------------------------------------------------------------------------
- def start_impl( self, ContainerName , ContainerType ):
+ def start_impl( self, ContainerName ):
MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) )
myMachine=string.split(os.getenv( "HOST" ),'.')
theContainer = "/Containers/" + myMachine[0] + "/" + ContainerName
else :
MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object found" )
return container
- if ContainerType == Engines.CppContainer :
- shstr = "SALOME_Container "
- else :
- shstr = "SALOME_ContainerPy.py "
+ shstr = "SALOME_ContainerPy.py "
shstr += ContainerName
# mpv: fix for SAL4731 - allways create new file to write log of server
the_command = "import " + nameToRegister + "\n"
the_command = the_command + "comp_i = " + nameToRegister + "." + nameToRegister
the_command = the_command + "(self._orb, self._poa, self._this(), self._containerName, instanceName, interfaceName)\n"
- valdir = dir()
- print "dir() : ",valdir
- print "self._orb",self._orb
- print "self._poa",self._poa
- print "self._this()",self._this()
- print "self._containerName",self._containerName
- print "instanceName",instanceName
- print "interfaceName",interfaceName
- print "exec the_command = '",the_command,"' :"
try :
exec the_command
comp_o = comp_i._this()
#-------------------------------------------------------------------------
- def type(self):
- MESSAGE( "SALOME_ContainerPy_i::type" )
- return Engines.PythonContainer
-
- #-------------------------------------------------------------------------
-
def _get_name(self):
MESSAGE( "SALOME_ContainerPy_i::_get_name " + self._Name )
return self._Name