|
Gaudi Framework, version v22r4 |
| Home | Generated: Fri Sep 2 2011 |
Base class for a component manager. More...
#include <ComponentManager.h>


Public Member Functions | |
| ComponentManager (IInterface *application, const InterfaceID &baseIID) | |
| Constructor. | |
| virtual const InterfaceID & | componentBaseInterface () const |
| Basic interface id of the managed components. | |
| virtual | ~ComponentManager () |
| Virtual destructor. | |
| StatusCode | queryInterface (const InterfaceID &iid, void **pinterface) |
| Specialized queryInterface implementation. | |
| virtual SmartIF< ISvcLocator > & | serviceLocator () const |
| Needed to locate the message service. | |
| virtual StatusCode | configure () |
| Configuration (from OFFLINE to CONFIGURED). | |
| virtual StatusCode | initialize () |
| Initialization (from CONFIGURED to INITIALIZED). | |
| virtual StatusCode | start () |
| Start (from INITIALIZED to RUNNING). | |
| virtual StatusCode | stop () |
| Stop (from RUNNING to INITIALIZED). | |
| virtual StatusCode | finalize () |
| Finalize (from INITIALIZED to CONFIGURED). | |
| virtual StatusCode | terminate () |
| Initialization (from CONFIGURED to OFFLINE). | |
| virtual StatusCode | reinitialize () |
| Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). | |
| virtual StatusCode | restart () |
| Initialization (from RUNNING to RUNNING, via INITIALIZED). | |
| virtual Gaudi::StateMachine::State | FSMState () const |
| Get the current state. | |
| virtual Gaudi::StateMachine::State | targetFSMState () const |
| When we are in the middle of a transition, get the state where the transition is leading us. | |
Protected Attributes | |
| SmartIF< IInterface > | m_application |
| Pointer to the owner of the manager. | |
| SmartIF< IStateful > | m_stateful |
| Pointer to the IStateful interface of the owner. | |
| InterfaceID | m_basicInterfaceId |
| Basic interface id of the managed components. | |
| SmartIF< ISvcLocator > | m_svcLocator |
| Service locator (needed to access the MessageSvc) | |
Base class for a component manager.
Definition at line 14 of file ComponentManager.h.
| ComponentManager::ComponentManager | ( | IInterface * | application, |
| const InterfaceID & | baseIID | ||
| ) |
Constructor.
| application | the manager of managers |
Definition at line 12 of file ComponentManager.cpp.
: m_application(application), m_stateful(application), m_basicInterfaceId(baseIID) { }
| ComponentManager::~ComponentManager | ( | ) | [virtual] |
| const InterfaceID & ComponentManager::componentBaseInterface | ( | ) | const [virtual] |
Basic interface id of the managed components.
Implements IComponentManager.
Definition at line 19 of file ComponentManager.cpp.
{
return m_basicInterfaceId;
}
| virtual StatusCode ComponentManager::configure | ( | ) | [inline, virtual] |
Configuration (from OFFLINE to CONFIGURED).
Implements IStateful.
Definition at line 38 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual StatusCode ComponentManager::finalize | ( | void | ) | [inline, virtual] |
Finalize (from INITIALIZED to CONFIGURED).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 50 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual Gaudi::StateMachine::State ComponentManager::FSMState | ( | ) | const [inline, virtual] |
Get the current state.
Implements IStateful.
Definition at line 63 of file ComponentManager.h.
{return m_stateful->FSMState();}
| virtual StatusCode ComponentManager::initialize | ( | void | ) | [inline, virtual] |
Initialization (from CONFIGURED to INITIALIZED).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 41 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| StatusCode ComponentManager::queryInterface | ( | const InterfaceID & | iid, |
| void ** | pinterface | ||
| ) | [virtual] |
Specialized queryInterface implementation.
If an interface is not fount in the implemented ones, we fall back on the owner.
Implements IInterface.
Reimplemented in extends1< ComponentManager, IAlgManager >, and extends2< ComponentManager, ISvcManager, ISvcLocator >.
Definition at line 30 of file ComponentManager.cpp.
{
// try local interfaces
StatusCode sc = base_class::queryInterface(iid,pinterface);
if (sc.isSuccess()) return sc;
// fall back on the owner
return m_application->queryInterface(iid, pinterface);
}
| virtual StatusCode ComponentManager::reinitialize | ( | ) | [inline, virtual] |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 57 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual StatusCode ComponentManager::restart | ( | ) | [inline, virtual] |
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 60 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual SmartIF<ISvcLocator>& ComponentManager::serviceLocator | ( | ) | const [inline, virtual] |
Needed to locate the message service.
Implements CommonMessaging< implements1< IComponentManager > >.
Reimplemented in ServiceManager.
Definition at line 32 of file ComponentManager.h.
{
if (!m_svcLocator) m_svcLocator = m_application;
return m_svcLocator;
}
| virtual StatusCode ComponentManager::start | ( | ) | [inline, virtual] |
Start (from INITIALIZED to RUNNING).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 44 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual StatusCode ComponentManager::stop | ( | ) | [inline, virtual] |
Stop (from RUNNING to INITIALIZED).
Implements IStateful.
Reimplemented in AlgorithmManager, and ServiceManager.
Definition at line 47 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
| virtual Gaudi::StateMachine::State ComponentManager::targetFSMState | ( | ) | const [inline, virtual] |
When we are in the middle of a transition, get the state where the transition is leading us.
Otherwise it returns the same state as state().
Implements IStateful.
Definition at line 67 of file ComponentManager.h.
{return m_stateful->targetFSMState();}
| virtual StatusCode ComponentManager::terminate | ( | ) | [inline, virtual] |
Initialization (from CONFIGURED to OFFLINE).
Implements IStateful.
Definition at line 53 of file ComponentManager.h.
{return StatusCode::SUCCESS;}
SmartIF<IInterface> ComponentManager::m_application [protected] |
Pointer to the owner of the manager.
Definition at line 72 of file ComponentManager.h.
InterfaceID ComponentManager::m_basicInterfaceId [protected] |
Basic interface id of the managed components.
Definition at line 78 of file ComponentManager.h.
SmartIF<IStateful> ComponentManager::m_stateful [protected] |
Pointer to the IStateful interface of the owner.
Definition at line 75 of file ComponentManager.h.
SmartIF<ISvcLocator> ComponentManager::m_svcLocator [mutable, protected] |
Service locator (needed to access the MessageSvc)
Definition at line 81 of file ComponentManager.h.