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

# ObjectMemberFunction< CallerClass > Class Template Reference

`#include <IUpdateManagerSvc.h>`

Inheritance diagram for ObjectMemberFunction< CallerClass >:

[legend]
Collaboration diagram for ObjectMemberFunction< CallerClass >:

[legend]

List of all members.

## Detailed Description

### template<class CallerClass>
class ObjectMemberFunction< CallerClass >

This class is used by IUpdateManagerSvc to keep pairs made of a member function and a pointer to the object for which that member function has to be called.

Author:
  Marco Clemencic

Definition at line 56 of file IUpdateManagerSvc.h.

## Public Types
typedef StatusCode(CallerClass::* | MemberFunctionType )()
| MemberFunctionType is the type for a pointer to a member function of class CallerClass.
## Public Member Functions
virtual | ~ObjectMemberFunction ()
| Virtual destructor.
virtual StatusCode | operator() () const
| Calls the member function of the object and returns the StatusCode.
virtual BaseObjectMemberFunction * | makeCopy () const
| Clone method to be able to copy an ObjectMemberFunction from the BaseObjectMemberFunction interface.
virtual const std::type_info & | type () const
| Returns the type_info of the CallerClass.
virtual bool | match (BaseObjectMemberFunction *bmf) const
| Comparison between two BaseObjectMemberFunction instances.
virtual DataObject * | castToDataObject () const
| Cast the object to DataObject.
virtual ValidDataObject * | castToValidDataObject () const
| Cast the object to ValidDataObject.
virtual void * | castToVoid () const
| Cast the object to void with dynamic_cast.
## Protected Member Functions
| ObjectMemberFunction (CallerClass *instance, const MemberFunctionType &mf)
| Standard constructor. Protected so that can be called only by itself or IUpdateManagerSvc.
## Protected Attributes
CallerClass * | m_instance
| Pointer to the object.
MemberFunctionType | m_memberFunction
| Pointer to the member function.
## Friends
class | IUpdateManagerSvc

## Member Typedef Documentation

template<class CallerClass>

typedef StatusCode(CallerClass::* ObjectMemberFunction< CallerClass >::MemberFunctionType)()

MemberFunctionType is the type for a pointer to a member function of class CallerClass.

## Constructor & Destructor Documentation

template<class CallerClass>

virtual ObjectMemberFunction< CallerClass >::~ObjectMemberFunction | ( |  | ) | `[inline, virtual]`

Virtual destructor.

Definition at line 62 of file IUpdateManagerSvc.h.

    00062 {};

template<class CallerClass>

ObjectMemberFunction< CallerClass >::ObjectMemberFunction | ( | CallerClass * | instance,
|  | const MemberFunctionType & | mf |
| ) |  |  | `[inline, protected]`

Standard constructor. Protected so that can be called only by itself or IUpdateManagerSvc.

Definition at line 110 of file IUpdateManagerSvc.h.

    00110                                                                            :
    00111     m_instance(instance),m_memberFunction(mf){}

## Member Function Documentation

template<class CallerClass>

virtual StatusCode ObjectMemberFunction< CallerClass >::operator() | ( |  | ) | const`[inline, virtual]`

Calls the member function of the object and returns the StatusCode.

If the pointer to the member function is NULL, do nothing and return success.

Implements BaseObjectMemberFunction.

Definition at line 66 of file IUpdateManagerSvc.h.

    00066                                          {
    00067     return (m_memberFunction != NULL)?
    00068       (m_instance->*m_memberFunction)() :
    00069       StatusCode::SUCCESS;
    00070   }

template<class CallerClass>

virtual BaseObjectMemberFunction* ObjectMemberFunction< CallerClass >::makeCopy | ( |  | ) | const`[inline, virtual]`

Clone method to be able to copy an ObjectMemberFunction from the BaseObjectMemberFunction interface.

Implements BaseObjectMemberFunction.

Definition at line 74 of file IUpdateManagerSvc.h.

    00074                                                      {
    00075     return new ObjectMemberFunction<CallerClass>(m_instance,m_memberFunction);
    00076   }

template<class CallerClass>

virtual const std::type_info& ObjectMemberFunction< CallerClass >::type | ( |  | ) | const`[inline, virtual]`

Returns the type_info of the CallerClass.

Implements BaseObjectMemberFunction.

Definition at line 79 of file IUpdateManagerSvc.h.

    00079 { return typeid(CallerClass); }

template<class CallerClass>

virtual bool ObjectMemberFunction< CallerClass >::match | ( | BaseObjectMemberFunction< CallerClass > * | bmf | ) | const`[inline, virtual]`

Comparison between two BaseObjectMemberFunction instances.

Implements BaseObjectMemberFunction.

Definition at line 82 of file IUpdateManagerSvc.h.

    00082                                                           {
    00083     if ( bmf == (BaseObjectMemberFunction *)this ) return true;
    00084     if (type() == bmf->type()) {
    00085       ObjectMemberFunction * mf = dynamic_cast<ObjectMemberFunction *>(bmf);
    00086       return m_instance == mf->m_instance &&
    00087         m_memberFunction == mf->m_memberFunction;
    00088     }
    00089     return false;
    00090   }

template<class CallerClass>

virtual DataObject* ObjectMemberFunction< CallerClass >::castToDataObject | ( |  | ) | const`[inline, virtual]`

Cast the object to DataObject.

Implements BaseObjectMemberFunction.

Definition at line 93 of file IUpdateManagerSvc.h.

    00093                                                {
    00094     return dynamic_cast<DataObject*>(m_instance);
    00095   }

template<class CallerClass>

virtual ValidDataObject* ObjectMemberFunction< CallerClass >::castToValidDataObject | ( |  | ) | const`[inline, virtual]`

Cast the object to ValidDataObject.

Implements BaseObjectMemberFunction.

Definition at line 98 of file IUpdateManagerSvc.h.

    00098                                                          {
    00099     return dynamic_cast<ValidDataObject*>(m_instance);
    00100   }

template<class CallerClass>

virtual void* ObjectMemberFunction< CallerClass >::castToVoid | ( |  | ) | const`[inline, virtual]`

Cast the object to void with dynamic_cast.

Implements BaseObjectMemberFunction.

Definition at line 103 of file IUpdateManagerSvc.h.

    00103                                    {
    00104     return dynamic_cast<void*>(m_instance);
    00105   }

## Friends And Related Function Documentation

template<class CallerClass>

friend class IUpdateManagerSvc`[friend]`

Definition at line 119 of file IUpdateManagerSvc.h.

## Member Data Documentation

template<class CallerClass>

CallerClass* ObjectMemberFunction< CallerClass >::m_instance`[protected]`

Pointer to the object.

Definition at line 114 of file IUpdateManagerSvc.h.

template<class CallerClass>

MemberFunctionType ObjectMemberFunction< CallerClass >::m_memberFunction`[protected]`

Pointer to the member function.

Definition at line 117 of file IUpdateManagerSvc.h.

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

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