| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# SmartIFBase< TYPE > Class Template Reference

`#include <SmartIF.h>`

Inheritance diagram for SmartIFBase< TYPE >:

[legend]
Collaboration diagram for SmartIFBase< TYPE >:

[legend]

List of all members.

## Detailed Description

### template<class TYPE>
class SmartIFBase< TYPE >

Definition at line 31 of file SmartIF.h.

## Public Member Functions
bool | isValid () const
| Allow for check if smart pointer is valid.
| operator TYPE * ()
| Automatic conversion to constined interface type.
| operator const TYPE * () const
| Automatic conversion to constined interface type (CONST).
bool | operator!= (const TYPE *test) const
| Check for non-equality.
bool | operator== (const TYPE *test) const
| Check for equality.
TYPE * | operator-> ()
| Dereference operator.
const TYPE * | operator-> () const
| Dereference operator (CONST).
void ** | operator & ()
| Allow for use as void pointer.
const TYPE * | get ()
| Get reference to interface pointer.
TYPE *& | pRef ()
| Get reference to interface pointer.
const TYPE *const & | pRef () const
| Get reference to interface pointer (CONST).
bool | operator! () const
| check the validity of the interface
## Protected Member Functions
void | releaseInterface ()
| Release interface.
| SmartIFBase (const InterfaceID &iid)
| Standard constructor.
virtual | ~SmartIFBase ()
| Standard Destructor.
## Protected Attributes
const InterfaceID | m_iid
TYPE * | m_interface
## Private Member Functions
| SmartIFBase (const SmartIFBase &copy)
| disable copy
SmartIFBase & | operator= (const SmartIFBase &right)
| disable assignement

## Constructor & Destructor Documentation

template<class TYPE>

SmartIFBase< TYPE >::SmartIFBase | ( | const InterfaceID & | iid | ) | `[inline, protected]`

Standard constructor.

Definition at line 41 of file SmartIF.h.

    00041                                        :  m_iid(iid), m_interface(0)      {
    00042   }

template<class TYPE>

virtual SmartIFBase< TYPE >::~SmartIFBase | ( |  | ) | `[inline, protected, virtual]`

Standard Destructor.

Definition at line 44 of file SmartIF.h.

    00044                             {
    00045     releaseInterface();
    00046   }

template<class TYPE>

SmartIFBase< TYPE >::SmartIFBase | ( | const SmartIFBase< TYPE > & | copy | ) | `[private]`

disable copy

## Member Function Documentation

template<class TYPE>

void SmartIFBase< TYPE >::releaseInterface | ( |  | ) | `[inline, protected]`

Release interface.

Definition at line 36 of file SmartIF.h.

    00036                             {
    00037     if ( m_interface ) m_interface->release();
    00038     m_interface = 0;
    00039   }

template<class TYPE>

bool SmartIFBase< TYPE >::isValid | ( |  | ) | const`[inline]`

Allow for check if smart pointer is valid.

Definition at line 49 of file SmartIF.h.

    00049                            {
    00050     return ( 0 != m_interface );
    00051   }

template<class TYPE>

SmartIFBase< TYPE >::operator TYPE * | ( |  | ) | `[inline]`

Automatic conversion to constined interface type.

Definition at line 53 of file SmartIF.h.

    00053                       {
    00054     return m_interface;
    00055   }

template<class TYPE>

SmartIFBase< TYPE >::operator const TYPE * | ( |  | ) | const`[inline]`

Automatic conversion to constined interface type (CONST).

Definition at line 57 of file SmartIF.h.

    00057                                   {
    00058     return m_interface;
    00059   }

template<class TYPE>

bool SmartIFBase< TYPE >::operator!= | ( | const TYPE * | test | ) | const`[inline]`

Check for non-equality.

Definition at line 61 of file SmartIF.h.

    00061                                                {
    00062     return test != m_interface;
    00063   }

template<class TYPE>

bool SmartIFBase< TYPE >::operator== | ( | const TYPE * | test | ) | const`[inline]`

Check for equality.

Definition at line 65 of file SmartIF.h.

    00065                                                {
    00066     return test == m_interface;
    00067   }

template<class TYPE>

TYPE* SmartIFBase< TYPE >::operator-> | ( |  | ) | `[inline]`

Dereference operator.

Definition at line 69 of file SmartIF.h.

    00069                         {
    00070     return m_interface;
    00071   }

template<class TYPE>

const TYPE* SmartIFBase< TYPE >::operator-> | ( |  | ) | const`[inline]`

Dereference operator (CONST).

Definition at line 73 of file SmartIF.h.

    00073                                    {
    00074     return m_interface;
    00075   }

template<class TYPE>

void** SmartIFBase< TYPE >::operator & | ( |  | ) | `[inline]`

Allow for use as void pointer.

Definition at line 77 of file SmartIF.h.

    00077                          {
    00078     return (void**) &m_interface;
    00079   }

template<class TYPE>

const TYPE* SmartIFBase< TYPE >::get | ( |  | ) | `[inline]`

Get reference to interface pointer.

Definition at line 81 of file SmartIF.h.

    00081                     {
    00082     return m_interface;
    00083   }

template<class TYPE>

TYPE*& SmartIFBase< TYPE >::pRef | ( |  | ) | `[inline]`

Get reference to interface pointer.

Definition at line 85 of file SmartIF.h.

    00085                 {
    00086     return this->m_interface;
    00087   }

template<class TYPE>

const TYPE* const& SmartIFBase< TYPE >::pRef | ( |  | ) | const`[inline]`

Get reference to interface pointer (CONST).

Definition at line 89 of file SmartIF.h.

    00089                                     {
    00090     return this->m_interface;
    00091   }

template<class TYPE>

bool SmartIFBase< TYPE >::operator! | ( |  | ) | const`[inline]`

check the validity of the interface

Reimplemented in SmartIF< TYPE >, SmartIF< IInterface >, SmartIF< IStateful >, and SmartIF< IPartitionControl >.

Definition at line 93 of file SmartIF.h.

    00093 { return !(this->isValid()) ; }

template<class TYPE>

SmartIFBase& SmartIFBase< TYPE >::operator= | ( | const SmartIFBase< TYPE > & | right | ) | `[private]`

disable assignement

## Member Data Documentation

template<class TYPE>

const InterfaceID SmartIFBase< TYPE >::m_iid`[protected]`

Definition at line 33 of file SmartIF.h.

template<class TYPE>

TYPE* SmartIFBase< TYPE >::m_interface`[protected]`

Definition at line 34 of file SmartIF.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiKernel/GaudiKernel/SmartIF.h