|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Encapsulates a general call-back function. More...
#include <e32std.h>
Public Member Functions | |
| TCallBack () | |
| Default constructor. | |
| TCallBack (TInt(*aFunction)(TAny *aPtr)) | |
| Constructs the callback object with the specified callback function. | |
| TCallBack (TInt(*aFunction)(TAny *aPtr), TAny *aPtr) | |
| Constructs the callback object with the specified callback function and a pointer to any object. | |
| TInt | CallBack () const |
| Calls the callback function. | |
Public Attributes | |
| TInt(* | iFunction )(TAny *aPtr) |
| A pointer to the callback function. | |
| TAny * | iPtr |
| A pointer that is passed to the callback function when the function is called. | |
Encapsulates a general call-back function.
The class encapsulates:
The callback function can be a static function of a class, e.g. TInt X::Foo(TAny *) or it can be a function which is not a member of any class, e.g. TInt Foo(TAny *).
When used with the CIdle and the CPeriodic classes, the callback function is intended to be called repeatedly; the encapsulated pointer is passed on each call. Typically, the pointer refers to an object which records the state of the task across each call. When used with CIdle, the callback function should also return a true (non-zero) value if it is intended to be called again, otherwise it should return a false (zero) value.
|
inline |
|
inline |
Constructs the callback object with the specified callback function.
| aFunction | A pointer to the callback function. It takes an argument of type TAny* and returns a TInt. It must be either a static member of a class or a function which is not a member of any class. |
(generated from Symbian Developer Library)
|
inline |
Constructs the callback object with the specified callback function and a pointer to any object.
| aFunction | A pointer to the callback function. It takes an argument of type TAny* and returns a TInt. It must be either a static member of a class or a function which is not a member of any class. |
| aPtr | A pointer which is always passed to the callback function. |
(generated from Symbian Developer Library)
|
inline |
| TInt(* TCallBack::iFunction) (TAny *aPtr) |
| TAny* TCallBack::iPtr |