Back to index

salome-kernel  6.5.0
Public Member Functions | Protected Attributes
SALOMEDS_DriverFactory_i Class Reference

#include <SALOMEDS_Driver_i.hxx>

Inheritance diagram for SALOMEDS_DriverFactory_i:
Inheritance graph
[legend]
Collaboration diagram for SALOMEDS_DriverFactory_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SALOMEDS_DriverFactory_i (CORBA::ORB_ptr theORB)
 ~SALOMEDS_DriverFactory_i ()
virtual SALOMEDSImpl_Driver * GetDriverByType (const std::string &theComponentType)
virtual SALOMEDSImpl_Driver * GetDriverByIOR (const std::string &theIOR)

Protected Attributes

CORBA::ORB_var _orb
SALOME_NamingService_name_service

Detailed Description

Definition at line 109 of file SALOMEDS_Driver_i.hxx.


Constructor & Destructor Documentation

Definition at line 318 of file SALOMEDS_Driver_i.cxx.

{
  _orb = CORBA::ORB::_duplicate(theORB);
  _name_service = new SALOME_NamingService(_orb);
}

Definition at line 325 of file SALOMEDS_Driver_i.cxx.

{
  delete _name_service;
}

Member Function Documentation

SALOMEDSImpl_Driver * SALOMEDS_DriverFactory_i::GetDriverByIOR ( const std::string &  theIOR) [virtual]

Implements SALOMEDSImpl_DriverFactory.

Definition at line 354 of file SALOMEDS_Driver_i.cxx.

{
  CORBA::Object_var obj;
  obj = _orb->string_to_object(theIOR.c_str());
 
  if (!CORBA::is_nil(obj)) {
    SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
    return new SALOMEDS_Driver_i(aDriver, _orb);
  }

  return NULL;
}
SALOMEDSImpl_Driver * SALOMEDS_DriverFactory_i::GetDriverByType ( const std::string &  theComponentType) [virtual]

Implements SALOMEDSImpl_DriverFactory.

Definition at line 330 of file SALOMEDS_Driver_i.cxx.

{
  CORBA::Object_var obj;

  std::string aFactoryType;
  if (theComponentType == "SUPERV") aFactoryType = "SuperVisionContainer";
  else aFactoryType = "FactoryServer";

  SALOMEDS::unlock();
  obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component(aFactoryType.c_str(), theComponentType.c_str());
  SALOMEDS::lock();

  if (CORBA::is_nil(obj)) {
    obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component("FactoryServerPy", theComponentType.c_str());
  }

  if (!CORBA::is_nil(obj)) {
    SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
    return new SALOMEDS_Driver_i(aDriver, _orb);
  }

  return NULL;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 113 of file SALOMEDS_Driver_i.hxx.

CORBA::ORB_var SALOMEDS_DriverFactory_i::_orb [protected]

Definition at line 112 of file SALOMEDS_Driver_i.hxx.


The documentation for this class was generated from the following files: