| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
interfaceMatch< T > Struct Template Reference

Helper class for the cast used in the MPL for_each algorithm in the implementation of queryInterface. More...

`#include <implements.h>`

Collaboration diagram for interfaceMatch< T >:
[legend]

## Public Member Functions
| interfaceMatch (const T *_instance, const InterfaceID &_tid, void *&_ptr)
template<typename IID >
void | operator() (IID)

## Public Attributes
const InterfaceID & | target
| InterfaceID for the requested interface.
void *& | ptr
| Pointer to be filled.
const T * | instance
| Value of this.

## Detailed Description

### template<typename T>
struct interfaceMatch< T >

Helper class for the cast used in the MPL for_each algorithm in the implementation of queryInterface.

Author
  Marco Clemencic

Definition at line 11 of file implements.h.

## Constructor & Destructor Documentation

template<typename T>

interfaceMatch< T >::interfaceMatch | ( | const T * | _instance,
|  | const InterfaceID & | _tid,
|  | void *& | _ptr
| ) |  |
| inline

Definition at line 18 of file implements.h.

:
target(_tid),
ptr(_ptr),
instance(_instance){}

## Member Function Documentation

template<typename T>
template<typename IID >

void interfaceMatch< T >::operator() | ( | IID |  | ) |
| inline

Definition at line 24 of file implements.h.

{
if ((!ptr) && target.versionMatch(IID::interfaceID())) {
ptr = const_cast<void*>(reinterpret_cast<const void*>(static_cast<const typename IID::iface_type*>(instance)));
}
}

## Member Data Documentation

template<typename T>

const T* interfaceMatch< T >::instance

Value of this.

Definition at line 17 of file implements.h.

template<typename T>

void*& interfaceMatch< T >::ptr

Pointer to be filled.

Definition at line 15 of file implements.h.

template<typename T>

const InterfaceID& interfaceMatch< T >::target

InterfaceID for the requested interface.

Definition at line 13 of file implements.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/implements.h