extends< BASE, Interfaces > Class Template Reference

Base class used to extend a class implementing other interfaces. More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiKernel/extends.h>

Inherits BASE, extend_interfaces< Interfaces...>, BASE, and extend_interfaces< Interfaces...>.

Inherited by AlgContextSvc, AlgorithmManager, AppMgrRunable, AuditorSvc, ChronoStatSvc, ConversionSvc, ConversionSvc, CounterSvc, DataOnDemandSvc, DataStreamTool, DataStreamTool, DataSvc, DataSvc, DataSvcFileEntriesTool, DetDataSvc, DODBasicMapper, EqSolver, EventCollectionSelector, EventSelector, ExceptionSvc, FileMgr, FileReadTool, FuncMinimum, Gaudi::IODataManager, Gaudi::MultiFileCatalog, Gaudi::ParticlePropertySvc, Gaudi::RootEvtSelector, Gaudi::RootEvtSelector, Gaudi::Utils::SignalMonitorSvc, Gaudi::Utils::StopSignalHandler, Google::AuditorBase, GslErrorCount, GslErrorException, GslErrorPrint, GslSvc, HistogramSvc [virtual], HistorySvc, IncidentSvc, IoComponentMgr, IssueLogger, JobOptionsSvc, MessageSvc, MinimalEventLoopMgr, MinimalEventLoopMgr, MultiStoreSvc, NTupleSvc, PartitionSwitchAlg, PartitionSwitchTool, PartPropSvc, PersistencySvc, PythonScriptingSvc, RecordDataSvc, RndmEngine, RndmGenSvc, ServiceManager, StalledEventMonitor, StatusCodeSvc, THistSvc, TimingAuditor, ToolSvc, and VFSSvc.

Collaboration diagram for extends< BASE, Interfaces >:

Public Types

typedef extends base_class
 Typedef to this class. More...
 
typedef extend_interfaces< Interfaces...> extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extends base_class
 Typedef to this class. More...
 
typedef extend_interfaces< Interfaces...> extend_interfaces_base
 Typedef to the base of this class. More...
 
- Public Types inherited from extend_interfaces< Interfaces...>
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Detailed Description

template<typename BASE, typename... Interfaces>
class extends< BASE, Interfaces >

Base class used to extend a class implementing other interfaces.

Version for one interface.

Author
Marco Clemencic

Definition at line 10 of file extends.h.

Member Typedef Documentation

template<typename BASE , typename... Interfaces>
typedef extends extends< BASE, Interfaces >::base_class

Typedef to this class.

Definition at line 14 of file extends.h.

template<typename BASE , typename... Interfaces>
typedef extends extends< BASE, Interfaces >::base_class

Typedef to this class.

Definition at line 14 of file extends.h.

template<typename BASE , typename... Interfaces>
typedef extend_interfaces<Interfaces...> extends< BASE, Interfaces >::extend_interfaces_base

Typedef to the base of this class.

Definition at line 16 of file extends.h.

template<typename BASE , typename... Interfaces>
typedef extend_interfaces<Interfaces...> extends< BASE, Interfaces >::extend_interfaces_base

Typedef to the base of this class.

Definition at line 16 of file extends.h.

Constructor & Destructor Documentation

template<typename BASE , typename... Interfaces>
extends< BASE, Interfaces >::~extends ( )
overridedefault

Virtual destructor.

template<typename BASE , typename... Interfaces>
extends< BASE, Interfaces >::~extends ( )
overridedefault

Virtual destructor.

Member Function Documentation

template<typename BASE , typename... Interfaces>
std::vector<std::string> extends< BASE, Interfaces >::getInterfaceNames ( ) const
inlineoverride

Implementation of IInterface::getInterfaceNames.

Definition at line 40 of file extends.h.

40  {
41  // TODO: fix possible duplication
42  using iids = typename extend_interfaces_base::ext_iids;
43  auto vb = BASE::getInterfaceNames();
44  auto vi = Gaudi::getInterfaceNames( iids{} );
45  // start from base
46  vb.insert( vb.end(), vi.begin(), vi.end() );
47  return vb;
48  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
std::vector< std::string > getInterfaceNames(Gaudi::interface_list< Is...>)
Definition: IInterface.h:177
template<typename BASE , typename... Interfaces>
std::vector<std::string> extends< BASE, Interfaces >::getInterfaceNames ( ) const
inlineoverride

Implementation of IInterface::getInterfaceNames.

Definition at line 40 of file extends.h.

40  {
41  // TODO: fix possible duplication
42  using iids = typename extend_interfaces_base::ext_iids;
43  auto vb = BASE::getInterfaceNames();
44  auto vi = Gaudi::getInterfaceNames( iids{} );
45  // start from base
46  vb.insert( vb.end(), vi.begin(), vi.end() );
47  return vb;
48  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
std::vector< std::string > getInterfaceNames(Gaudi::interface_list< Is...>)
Definition: IInterface.h:177
template<typename BASE , typename... Interfaces>
void* extends< BASE, Interfaces >::i_cast ( const InterfaceID tid) const
inlineoverride

Implementation of IInterface::i_cast.

Definition at line 22 of file extends.h.

22  {
23  using iids = typename extend_interfaces_base::ext_iids;
24  void *ptr = Gaudi::iid_cast(tid, iids{}, this);
25  return ptr ? ptr : BASE::i_cast(tid);
26  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is...>, P *ptr)
Definition: IInterface.h:182
template<typename BASE , typename... Interfaces>
void* extends< BASE, Interfaces >::i_cast ( const InterfaceID tid) const
inlineoverride

Implementation of IInterface::i_cast.

Definition at line 22 of file extends.h.

22  {
23  using iids = typename extend_interfaces_base::ext_iids;
24  void *ptr = Gaudi::iid_cast(tid, iids{}, this);
25  return ptr ? ptr : BASE::i_cast(tid);
26  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is...>, P *ptr)
Definition: IInterface.h:182
template<typename BASE , typename... Interfaces>
StatusCode extends< BASE, Interfaces >::queryInterface ( const InterfaceID ti,
void **  pp 
)
inlineoverride

Implementation of IInterface::queryInterface.

Definition at line 29 of file extends.h.

29  {
30  if (!pp) return StatusCode::FAILURE;
31  using iids = typename extend_interfaces_base::ext_iids;
32  *pp = Gaudi::iid_cast(ti,iids{},this);
33  // if cast failed, try the base class
34  if (!*pp) return BASE::queryInterface(ti,pp);
35  this->addRef();
36  return StatusCode::SUCCESS;
37  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is...>, P *ptr)
Definition: IInterface.h:182
template<typename BASE , typename... Interfaces>
StatusCode extends< BASE, Interfaces >::queryInterface ( const InterfaceID ti,
void **  pp 
)
inlineoverride

Implementation of IInterface::queryInterface.

Definition at line 29 of file extends.h.

29  {
30  if (!pp) return StatusCode::FAILURE;
31  using iids = typename extend_interfaces_base::ext_iids;
32  *pp = Gaudi::iid_cast(ti,iids{},this);
33  // if cast failed, try the base class
34  if (!*pp) return BASE::queryInterface(ti,pp);
35  this->addRef();
36  return StatusCode::SUCCESS;
37  }
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type ext_iids
take union of the ext_iids of all Interfaces...
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is...>, P *ptr)
Definition: IInterface.h:182

The documentation for this class was generated from the following file: