Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
9 
10 //------------------------------------------------------------------------------
11 // Constructor
13  : m_application( application ), m_stateful( application ), m_basicInterfaceId( baseIID ) {}
14 
15 //------------------------------------------------------------------------------
16 // Basic interface id of the managed components.
18 
19 //------------------------------------------------------------------------------
20 // queryInterface implementation that falls back on the owner.
21 StatusCode ComponentManager::queryInterface( const InterfaceID& iid, void** pinterface ) {
22  // try local interfaces
23  StatusCode sc = base_class::queryInterface( iid, pinterface );
24  // fall back on the owner, if local interface didn't match...
25  return sc.isSuccess() ? sc : m_application->queryInterface( iid, pinterface );
26 }
bool isSuccess() const
Definition: StatusCode.h:267
Interface ID class.
Definition: IInterface.h:29
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Definition of the basic interface.
Definition: IInterface.h:244
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
const InterfaceID & componentBaseInterface() const override
Basic interface id of the managed components.
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
Specialized queryInterface implementation.
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
ComponentManager(IInterface *application, const InterfaceID &baseIID)
Constructor.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.