From: prascle Date: Fri, 8 Jul 2005 09:10:21 +0000 (+0000) Subject: PR: overloaded method possible with SWIG: unification of FindOrLoad_Component X-Git-Tag: BR_V220_LifeCycle_20050711 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_V220_LifeCycle;p=modules%2Fkernel.git PR: overloaded method possible with SWIG: unification of FindOrLoad_Component --- diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index f8b2463f7..aa199fc76 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -197,8 +197,6 @@ SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params, /*! Public - * Find and aready existing and registered component instance or load a new * component instance on a container defined by machine parameters. - * Renamed (Else / Or) to avoid problems with Python (Swig) version and keep - * compatiblity with existing Python method FindOrLoadComponent * \param params machine parameters like type or name... * \param componentName the name of component class * \param studyId default = 0 : multistudy instance @@ -208,9 +206,9 @@ SALOME_LifeCycleCORBA::LoadComponent(const Engines::MachineParameters& params, Engines::Component_ptr SALOME_LifeCycleCORBA:: -FindElseLoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId) +FindOrLoad_Component(const Engines::MachineParameters& params, + const char *componentName, + int studyId) { if (! isKnownComponentClass(componentName)) return Engines::Component::_nil(); @@ -233,7 +231,7 @@ FindElseLoadComponent(const Engines::MachineParameters& params, * - 1 localhost/aContainer * - 2 aContainer * - 3 /machine/aContainer - * (not the same rules as FindContainer() method base on protected method + * (not the same rules as FindContainer() method based on protected method * ContainerName() -- MUST BE CORRECTED --) * \param componentName the name of component class * \return a CORBA reference of the component instance, or _nil if problem @@ -285,7 +283,7 @@ SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName, params->hostname=CORBA::string_dup(stContainer); params->OS=CORBA::string_dup("LINUX"); free(stContainer); - return FindElseLoadComponent(params,componentName); + return FindOrLoad_Component(params,componentName); } } @@ -494,9 +492,9 @@ SALOME_LifeCycleCORBA::_FindOrStartContainer(const string aComputerContainer , * \param aComputerContainer container name under one of the forms: * - 1 aContainer * - 2 machine/aContainer - * \param theComputer return computer name: + * \param theComputer return computer name (machine): * - 1 machine = GetHostname() - * - 2 machine (localhost replaced by GetHostName()) + * - 2 machine = as given (localhost replaced by GetHostName()) * \param theContainer return container name: * - 1 aContainer * - 2 aContainer diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx index 2b8a301f5..859543a1e 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx @@ -60,9 +60,9 @@ public: int studyId=0); Engines::Component_ptr - FindElseLoadComponent(const Engines::MachineParameters& params, - const char *componentName, - int studyId =0); + FindOrLoad_Component(const Engines::MachineParameters& params, + const char *componentName, + int studyId =0); Engines::Component_ptr FindOrLoad_Component(const char *containerName, diff --git a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 2fef32d5f..479bc930a 100644 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@ -9,9 +9,9 @@ lcc = LifeCycleCORBA.LifeCycleCORBA() #comp.Coucou(1) param={} -param['hostname']='cli70ac' +param['hostname']='cli76ce' param['container_name']='myContainer' -smesh=lcc.FindElseLoadComponent(param,'SMESH') +smesh=lcc.FindOrLoad_Component(param,'SMESH') container=lcc.FindContainer('myContainer') engine=lcc.FindComponent(param,'SMESH')