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

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

#include <GaudiKernel/extends.h>

Inheritance diagram for extends1< BASE, I1 >:
Collaboration diagram for extends1< BASE, I1 >:

Public Types

typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1< I1 > 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_interfaces1< I1 >
typedef I1::iid::iids::type ext_iids
 MPL set of interfaces extended by this one. More...
 

Public Member Functions

template<typename A1 , typename A2 , typename A3 >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
template<typename A1 , typename A2 >
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
template<typename A1 >
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 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 ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces1< I1 >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 

Detailed Description

template<typename BASE, typename I1>
struct extends1< BASE, I1 >

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 I1>
typedef extends1 extends1< BASE, I1 >::base_class

Typedef to this class.

Definition at line 12 of file extends.h.

template<typename BASE, typename I1>
typedef extend_interfaces1<I1> extends1< BASE, I1 >::extend_interfaces_base

Typedef to the base of this class.

Definition at line 14 of file extends.h.

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

MPL set of all the implemented interfaces.

Definition at line 17 of file extends.h.

Constructor & Destructor Documentation

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

Templated constructor with 3 arguments.

Definition at line 21 of file extends.h.

21 : BASE(a1,a2,a3){}
template<typename BASE, typename I1>
template<typename A1 , typename A2 >
extends1< BASE, I1 >::extends1 ( A1  a1,
A2  a2 
)
inline

Templated constructor with 2 arguments.

Definition at line 23 of file extends.h.

23 : BASE(a1, a2){}
template<typename BASE, typename I1>
template<typename A1 >
extends1< BASE, I1 >::extends1 ( A1  a1)
inline

Templated constructor with 1 argument.

Definition at line 25 of file extends.h.

25 : BASE(a1){}
template<typename BASE, typename I1>
extends1< BASE, I1 >::extends1 ( )
inline

Default constructor.

Definition at line 27 of file extends.h.

27 : BASE(){}
template<typename BASE, typename I1>
virtual extends1< BASE, I1 >::~extends1 ( )
inlinevirtual

Virtual destructor.

Definition at line 68 of file extends.h.

68 {}

Member Function Documentation

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

Implementation of IInterface::getInterfaceNames.

Definition at line 58 of file extends.h.

58  {
59  std::vector<std::string> v = BASE::getInterfaceNames(); // start from the base
60 #ifndef __GCCXML__
61  AppendInterfaceName appender(v);
62  mpl::for_each<interfaces>(appender);
63 #endif
64  return v;
65  }
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>
virtual void* extends1< BASE, I1 >::i_cast ( const InterfaceID tid) const
inlinevirtual

Implementation of IInterface::i_cast.

Definition at line 30 of file extends.h.

30  {
31  void *ptr = 0;
32 #ifndef __GCCXML__
33  interfaceMatch<base_class> matcher(this,tid,ptr);
34  mpl::for_each<interfaces>(matcher);
35 #endif
36  if (!ptr) {
37  ptr = BASE::i_cast(tid);
38  }
39  return ptr;
40  }
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>
virtual StatusCode extends1< BASE, I1 >::queryInterface ( const InterfaceID ti,
void **  pp 
)
inlinevirtual

Implementation of IInterface::queryInterface.

Definition at line 43 of file extends.h.

43  {
44  if (!pp) return StatusCode::FAILURE;
45  *pp = 0;
46 #ifndef __GCCXML__
47  interfaceMatch<base_class> matcher(this,ti,*pp);
48  mpl::for_each<interfaces>(matcher);
49  if (!*pp) { // cast failed, try the base class
50  return BASE::queryInterface(ti,pp);
51  }
52  this->addRef();
53 #endif
54  return StatusCode::SUCCESS;
55  }
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: