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
13  m_application(application), m_stateful(application), m_basicInterfaceId(baseIID)
14 {
15 }
16 
17 //------------------------------------------------------------------------------
18 // Basic interface id of the managed components.
20  return m_basicInterfaceId;
21 }
22 
23 //------------------------------------------------------------------------------
24 // queryInterface implementation that falls back on the owner.
26 {
27  // try local interfaces
28  StatusCode sc = base_class::queryInterface(iid,pinterface);
29  if (sc.isSuccess()) return sc;
30  // fall back on the owner
31  return m_application->queryInterface(iid, pinterface);
32 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
Interface ID class.
Definition: IInterface.h:30
const InterfaceID & componentBaseInterface() const override
Basic interface id of the managed components.
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Definition of the basic interface.
Definition: IInterface.h:234
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
StatusCode queryInterface(const InterfaceID &iid, void **pinterface)
Specialized queryInterface implementation.
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.