INTERFACE CHANGE : add a boolean parameter regist with default value true to one Component constructor
It was needed to avoid calling registry two times for a python superv_component
Registry was called in the python constructor and in the corba proxy (class PySupervCompo)
that is used to implement DSC ports for python component.
As regist value is true by default there is no impact on other parts of KERNEL or of modules.
* \param instanceName unique instance name for this object (see Container_i)
* \param interfaceName component class name
* \param notif use of notification
+ * \param regist (true or false) use of registry (default true)
*/
//=============================================================================
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif) :
+ bool notif,
+ bool regist) :
_instanceName(instanceName),
_interfaceName(interfaceName),
_myConnexionToRegistry(0),
_contId = 0;
}
const CORBA::String_var ior = _orb->object_to_string(_container);
- _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", _instanceName.c_str());
+ if(regist)
+ _myConnexionToRegistry = new RegistryConnexion(0, 0, ior,"theSession", _instanceName.c_str());
_notifSupplier = new NOTIFICATION_Supplier(instanceName, notif);
}
MESSAGE("Engines_Component_i::destroy()");
//SCRUTE(pd_refCount);
- delete _notifSupplier;
- _notifSupplier = 0;
-
- delete _myConnexionToRegistry;
+ if(_myConnexionToRegistry)delete _myConnexionToRegistry;
_myConnexionToRegistry = 0 ;
+ if(_notifSupplier)delete _notifSupplier;
+ _notifSupplier = 0;
if(_id)
delete(_id) ;
//SCRUTE(pd_refCount);
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif = false);
- // Consructeur pour composant parallele: ne pas faire appel au registry
+ bool notif = false,
+ bool regist=true);
+ // Constructor for parallel component : don't call registry
Engines_Component_i(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif) : Engines_Component_i(orb, poa, container, instanceName, interfaceName)
+ bool notif,
+ bool regist) :
+ Engines_Component_i(orb, poa, container, instanceName, interfaceName,notif,regist)
{
#ifdef _DEBUG_
std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl;
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif = false);
+ bool notif = false,
+ bool regist = true );
virtual ~Engines_DSC_i();
const char *instanceName,
const char *interfaceName,
bool notif) :
- Superv_Component_i(orb, poa,contain, instanceName, interfaceName)
+ Superv_Component_i(orb, poa,contain, instanceName, interfaceName,false,false)
{
}
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif) : Engines_DSC_i(orb, poa, container, instanceName, interfaceName)
+ bool notif,
+ bool regist) :
+ Engines_DSC_i(orb, poa, container, instanceName, interfaceName,notif,regist)
{
#ifdef _DEBUG_
std::cerr << "--Superv_Component_i : MARK 1 ---- " << instanceName << "----" << std::endl;
Engines::Container_ptr container,
const char *instanceName,
const char *interfaceName,
- bool notif = false);
+ bool notif = false,
+ bool regist = true );
virtual ~Superv_Component_i();
// Exceptions declarations.