proj home

Files   Classes   Functions   Hierarchy  

fnobj0Tfn< T, A0 > Class Template Reference

Convert a member function with return type A0 and no arguments to a functional object. More...

#include <fnobjTfn.h>

Inheritance diagram for fnobj0Tfn< T, A0 >:
Collaboration diagram for fnobj0Tfn< T, A0 >:

List of all members.

Public Types

typedef A0(T::* Fptr )()

Public Member Functions

 fnobj0Tfn (T &data_, Fptr fn_)
A0 operator() ()

Public Attributes

Tdata
Fptr fn


Detailed Description

template<class T, class A0>
class fnobj0Tfn< T, A0 >

Convert a member function with return type A0 and no arguments to a functional object.

Example
  fnobj0<void> *ptr;
  hat3 h3;
  //h3.sumfunc(); 
  fnobj0Tfn<hat3,void> ph3(h3,&hat3::sumfunc);
  ptr = &ph3;
  (*ptr)();

Definition at line 19 of file fnobjTfn.h.


Member Typedef Documentation

template<class T, class A0>
typedef A0(T::* fnobj0Tfn< T, A0 >::Fptr)()


Constructor & Destructor Documentation

template<class T, class A0>
fnobj0Tfn< T, A0 >::fnobj0Tfn ( T data_,
Fptr  fn_ 
) [inline]

Definition at line 27 of file fnobjTfn.h.

00028      : data(&data_), fn(fn_) {}


Member Function Documentation

template<class T, class A0>
A0 fnobj0Tfn< T, A0 >::operator() (  )  [inline, virtual]

Implements fnobj0< A0 >.

Definition at line 30 of file fnobjTfn.h.

00031      { return (data->*fn)(); }


Member Data Documentation

template<class T, class A0>
T* fnobj0Tfn< T, A0 >::data

Definition at line 23 of file fnobjTfn.h.

Referenced by fnobj0Tfn< mazedisp03, void >::operator()().

template<class T, class A0>
Fptr fnobj0Tfn< T, A0 >::fn

Definition at line 25 of file fnobjTfn.h.

Referenced by fnobj0Tfn< mazedisp03, void >::operator()().


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

Generated on Fri Mar 4 00:49:56 2011 for Chelton Evans Source by  doxygen 1.5.8