All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extends2< BASE, I1, I2 > Struct Template Reference

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

#include <GaudiKernel/extends.h>

Inheritance diagram for extends2< BASE, I1, I2 >:
Collaboration diagram for extends2< BASE, I1, I2 >:

Public Types

typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2< I1,
I2 > 
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces2< I1, I2 >
typedef mpl::fold< typename
I1::iid::iids::type, typename
I2::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 

Public Member Functions

template<typename A1 , typename A2 , typename A3 >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
template<typename A1 , typename A2 >
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
template<typename A1 >
 extends2 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends2 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces2< I1, I2 >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 

Detailed Description

template<typename BASE, typename I1, typename I2>
struct extends2< BASE, I1, I2 >

Base class used to extend a class implementing other interfaces.

Version for two interfaces.

Author
Marco Clemencic

Definition at line 75 of file extends.h.

Member Typedef Documentation

template<typename BASE, typename I1, typename I2>
typedef extends2 extends2< BASE, I1, I2 >::base_class

Typedef to this class.

Definition at line 77 of file extends.h.

template<typename BASE, typename I1, typename I2>
typedef extend_interfaces2<I1,I2> extends2< BASE, I1, I2 >::extend_interfaces_base

Typedef to the base of this class.

Definition at line 79 of file extends.h.

template<typename BASE, typename I1, typename I2>
typedef extend_interfaces_base::ext_iids extends2< BASE, I1, I2 >::interfaces

MPL set of all the implemented interfaces.

Definition at line 82 of file extends.h.

Constructor & Destructor Documentation

template<typename BASE, typename I1, typename I2>
template<typename A1 , typename A2 , typename A3 >
extends2< BASE, I1, I2 >::extends2 ( A1  a1,
A2  a2,
A3  a3 
)
inline

Templated constructor with 3 arguments.

Definition at line 86 of file extends.h.

86 : BASE(a1,a2,a3){}
template<typename BASE, typename I1, typename I2>
template<typename A1 , typename A2 >
extends2< BASE, I1, I2 >::extends2 ( A1  a1,
A2  a2 
)
inline

Templated constructor with 2 arguments.

Definition at line 88 of file extends.h.

88 : BASE(a1, a2){}
template<typename BASE, typename I1, typename I2>
template<typename A1 >
extends2< BASE, I1, I2 >::extends2 ( A1  a1)
inline

Templated constructor with 1 argument.

Definition at line 90 of file extends.h.

90 : BASE(a1){}
template<typename BASE, typename I1, typename I2>
extends2< BASE, I1, I2 >::extends2 ( )
inline

Default constructor.

Definition at line 92 of file extends.h.

92 : BASE(){}
template<typename BASE, typename I1, typename I2>
virtual extends2< BASE, I1, I2 >::~extends2 ( )
inlinevirtual

Virtual destructor.

Reimplemented in extends2< DataSvc, IDetDataSvc, IIncidentListener >, and extends2< DataSvc, INTupleSvc, IDataSourceMgr >.

Definition at line 133 of file extends.h.

133 {}

Member Function Documentation

template<typename BASE, typename I1, typename I2>
virtual std::vector<std::string> extends2< BASE, I1, I2 >::getInterfaceNames ( ) const
inlinevirtual

Implementation of IInterface::getInterfaceNames.

Reimplemented in extends2< DataSvc, IDetDataSvc, IIncidentListener >, extends2< DataSvc, INTupleSvc, IDataSourceMgr >, extends1< DataSvc, IIncidentListener >, and extends1< DataSvc, IHistogramSvc >.

Definition at line 123 of file extends.h.

123  {
124  std::vector<std::string> v = BASE::getInterfaceNames(); // start from the base
125 #ifndef __GCCXML__
126  AppendInterfaceName appender(v);
127  mpl::for_each<interfaces>(appender);
128 #endif
129  return v;
130  }
Helper class for the cast used in the MPL for_each algorithm in the implementation of query_interface...
Definition: implements.h:33
template<typename BASE, typename I1, typename I2>
virtual void* extends2< BASE, I1, I2 >::i_cast ( const InterfaceID tid) const
inlinevirtual

Implementation of IInterface::i_cast.

Reimplemented in extends2< DataSvc, IDetDataSvc, IIncidentListener >, extends2< DataSvc, INTupleSvc, IDataSourceMgr >, extends1< DataSvc, IIncidentListener >, and extends1< DataSvc, IHistogramSvc >.

Definition at line 95 of file extends.h.

95  {
96  void *ptr = 0;
97 #ifndef __GCCXML__
98  interfaceMatch<base_class> matcher(this,tid,ptr);
99  mpl::for_each<interfaces>(matcher);
100 #endif
101  if (!ptr) {
102  ptr = BASE::i_cast(tid);
103  }
104  return ptr;
105  }
Helper class for the cast used in the MPL for_each algorithm in the implementation of queryInterface...
Definition: implements.h:11
template<typename BASE, typename I1, typename I2>
virtual StatusCode extends2< BASE, I1, I2 >::queryInterface ( const InterfaceID ti,
void **  pp 
)
inlinevirtual

Implementation of IInterface::queryInterface.

Reimplemented in extends2< DataSvc, IDetDataSvc, IIncidentListener >, extends2< DataSvc, INTupleSvc, IDataSourceMgr >, extends1< DataSvc, IIncidentListener >, and extends1< DataSvc, IHistogramSvc >.

Definition at line 108 of file extends.h.

108  {
109  if (!pp) return StatusCode::FAILURE;
110  *pp = 0;
111 #ifndef __GCCXML__
112  interfaceMatch<base_class> matcher(this,ti,*pp);
113  mpl::for_each<interfaces>(matcher);
114  if (!*pp) { // cast failed, try the base class
115  return BASE::queryInterface(ti,pp);
116  }
117  this->addRef();
118 #endif
119  return StatusCode::SUCCESS;
120  }
Helper class for the cast used in the MPL for_each algorithm in the implementation of queryInterface...
Definition: implements.h:11

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