| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

ComponentManager.cpp
Go to the documentation of this file.
1 /*
2 * ComponentManager.cpp
3 *
4 * Created on: Feb 20, 2009
5 * Author: Marco Clemencic
6 */
7
8 #include "GaudiKernel/ComponentManager.h"
9
10 //------------------------------------------------------------------------------
11 // Constructor
12 ComponentManager::ComponentManager( IInterface* application, const InterfaceID& baseIID )
13 : m_application( application ), m_stateful( application ), m_basicInterfaceId( baseIID )
14 {
15 }
16
17 //------------------------------------------------------------------------------
18 // Basic interface id of the managed components.
19 const InterfaceID& ComponentManager::componentBaseInterface() const { return m_basicInterfaceId; }
20
21 //------------------------------------------------------------------------------
22 // queryInterface implementation that falls back on the owner.
23 StatusCode ComponentManager::queryInterface( const InterfaceID& iid, void** pinterface )
24 {
25 // try local interfaces
26 StatusCode sc = base_class::queryInterface( iid, pinterface );
27 // fall back on the owner, if local interface didn't match...
28 return sc.isSuccess() ? sc : m_application->queryInterface( iid, pinterface );
29 }
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
InterfaceID
Interface ID class.
Definition: IInterface.h:29
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:75
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IInterface
Definition of the basic interface.
Definition: IInterface.h:277
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:69
ComponentManager::componentBaseInterface
const InterfaceID & componentBaseInterface() const override
Basic interface id of the managed components.
Definition: ComponentManager.cpp:19
ComponentManager::queryInterface
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
Specialized queryInterface implementation.
Definition: ComponentManager.cpp:23
ComponentManager.h
queryInterface
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
ComponentManager::ComponentManager
ComponentManager(IInterface *application, const InterfaceID &baseIID)
Constructor.
Definition: ComponentManager.cpp:12
IInterface::queryInterface
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.