| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# interfaceMatch< THIS > 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< THIS >:
[legend]

List of all members.

## Public Member Functions
| interfaceMatch (THIS *_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.
THIS * | instance
| Value of this.

## Detailed Description

### template<typename THIS>
struct interfaceMatch< THIS >

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

Author:
  Marco Clemencic

Definition at line 34 of file implements.h.

## Constructor & Destructor Documentation

template<typename THIS>

interfaceMatch< THIS >::interfaceMatch | ( | THIS * | _instance,
|  | const InterfaceID & | _tid,
|  | void *& | _ptr |
| ) |  |  | `[inline]`

Definition at line 41 of file implements.h.

    00041                                                                         :
    00042     target(_tid),
    00043     ptr(_ptr),
    00044     instance(_instance){}

## Member Function Documentation

template<typename THIS>
template<typename IID>

void interfaceMatch< THIS >::operator() | ( | IID |  | ) | `[inline]`

Definition at line 47 of file implements.h.

    00047                                {
    00048     if ((!ptr) && target.versionMatch(IID::interfaceID())) {
    00049       ptr = reinterpret_cast<void*>(static_cast<typename IID::iface_type*>(instance));
    00050     }
    00051   }

## Member Data Documentation

template<typename THIS>

const InterfaceID& interfaceMatch< THIS >::target

InterfaceID for the requested interface.

Definition at line 36 of file implements.h.

template<typename THIS>

void*& interfaceMatch< THIS >::ptr

Pointer to be filled.

Definition at line 38 of file implements.h.

template<typename THIS>

THIS* interfaceMatch< THIS >::instance

Value of this.

Definition at line 40 of file implements.h.

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

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