TCallBackWithArg Class Reference
This description is cloned from
TCallBack
in e32std.h. The only difference between
TCallBack
and
TCallBackWithArg
is that the callback of the latter takes 3 arguments.
TCallBackWithArg
encapsulates a general call-back function. The class encapsulates: 1. a pointer to a function which takes 3 arguments, TAny*, TInt, and TAny* and returns a TInt. 2. a pointer which is passed to the function every time it is called. The pointer can point to any object. This pointer is required in the constructor but can be NULL if not used. 3. The TInt and the other TAny* arguments are passed in when invoking the callback function. Do not let the names of the 3 callback arguments dictate their uses. Feel free to store anything you want or ignore anyone that is not needed.
The callback function can be a static function of a class, e.g. static TInt X::Foo(TAny*, TInt, TAny*) or it can be a function which is not a member of any class, e.g. TInt Foo(TAny *, TInt, TAny*).
Constructor & Destructor Documentation
TCallBackWithArg()
TCallBackWithArg
|
(
|
)
|
[inline]
|
Default contructor sets the callback function to NULL. This way a not yet initialized callback object will just do nothing.
TCallBackWithArg(TInt(*)(TAny *aObj, TInt aEvent, TAny *aData), TAny *)
TCallBackWithArg
|
(
|
TInt
(*)(
TAny
*aObj,
TInt
aEvent,
TAny
*aData)
|
aFunction,
|
|
TAny
*
|
aObj
|
|
)
|
[inline]
|
Member Functions Documentation
CallBack(TInt, TAny *)
TInt
|
CallBack
|
(
|
TInt
|
aEvent = ECallBackId_None,
|
|
TAny
*
|
aData = NULL
|
|
)
|
const [inline]
|
Parameters
TInt
aEvent = ECallBackId_None
|
|
TAny
* aData = NULL
|
|
Member Data Documentation
TInt(* iFunction
A pointer to the callback function.
TAny * iObj
the first argument in the callback function.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.