All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
17 //------------------------------------------------------------------------------
18 // Basic interface id of the managed components.
20  return m_basicInterfaceId;
21 }
22 
23 //------------------------------------------------------------------------------
24 // Virtual destructor
26 }
27 
28 //------------------------------------------------------------------------------
29 // queryInterface implementation that falls back on the owner.
31 {
32  // try local interfaces
33  StatusCode sc = base_class::queryInterface(iid,pinterface);
34  if (sc.isSuccess()) return sc;
35  // fall back on the owner
36  return m_application->queryInterface(iid, pinterface);
37 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
virtual ~ComponentManager()
Virtual destructor.
Gaudi::InterfaceId< IInterface, 0, 0 > iid
Interface ID.
Definition: IInterface.h:164
Interface ID class.
Definition: IInterface.h:55
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const InterfaceID & componentBaseInterface() const
Basic interface id of the managed components.
Definition of the basic interface.
Definition: IInterface.h:160
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.