Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Core::Callback< ReturnT > Class Template Reference

Callback is wrapper of any non-static method and its receiving object with possibility to execute the method repeatedly. More...

#include <Callback.h>

Inheritance diagram for Core::Callback< ReturnT >:

Inheritance graph
[legend]
Collaboration diagram for Core::Callback< ReturnT >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int argumentsNumber (void) abstract
virtual ReturnT execute (void)
virtual ReturnT executeWith (Object *)

Detailed Description

template<typename ReturnT>
class Core::Callback< ReturnT >

Callback is wrapper of any non-static method and its receiving object with possibility to execute the method repeatedly.

It's usefull on places where you can think about passing a function as an argument of some other function. It's used for example by Thread and Promise classes but is hidden and you don't need to bother with that ugly template stuff. This class is abstract one. If you really need it use Callback0 or Callback1.

Definition at line 40 of file Callback.h.


Member Function Documentation

template<typename ReturnT>
virtual int Core::Callback< ReturnT >::argumentsNumber void   )  [virtual]
 

Reimplemented in Core::Callback0< ListenerT, ReturnT >, and Core::Callback1< ListenerT, ReturnT, Param1T >.

template<typename ReturnT>
virtual ReturnT Core::Callback< ReturnT >::execute void   )  [inline, virtual]
 

Reimplemented in Core::Callback0< ListenerT, ReturnT >, and Core::Callback1< ListenerT, ReturnT, Param1T >.

Definition at line 47 of file Callback.h.

Referenced by Core::Callback< void >::executeWith(), and Core::Callback< Object * >::executeWith().

00048     {
00049         shouldNotImplement(__PRETTY_FUNCTION__);
00050         return nil;
00051     }

template<typename ReturnT>
virtual ReturnT Core::Callback< ReturnT >::executeWith Object  )  [inline, virtual]
 

Reimplemented in Core::Callback1< ListenerT, ReturnT, Param1T >.

Definition at line 53 of file Callback.h.

Referenced by OS::Promise::executePromise().

00054     {
00055         return execute();
00056     }


The documentation for this class was generated from the following file:
Generated on Mon Nov 27 09:51:11 2006 for Smalltalk like C++ Class Library by  doxygen 1.4.2