37 #ifndef GENAPI_NODECALLBACK_H 38 #define GENAPI_NODECALLBACK_H 95 template <
class Function>
102 m_pFunction( function )
132 template <
class Function>
145 template<
class Function>
149 return pNode->RegisterCallback(pCallback);
161 template <
class Client,
class Member>
166 typedef void (Client::*PMEMBERFUNC)(
INode*);
172 m_pMemberFunc(member)
179 (m_Client.*m_pMemberFunc)(
m_pNode );
205 template <
class Client,
class Member>
217 template<
class Client,
class Member>
221 return pNode->RegisterCallback(pCallback);
231 #endif // GENAPI_NODECALLBACK_H _ECallbackType
the type of callback
virtual void Destroy()
destroys the object
Definition of interface INode and types NodeList_t and CallbackHandleType:
virtual void operator=(bool Value)
Set node value.
ECallbackType m_CallbackType
the type of the callback
virtual void Destroy()
destroys the object
virtual void operator()(ECallbackType CallbackType) const
execute operation: call the function
PMEMBERFUNC m_pMemberFunc
The method to call.
callback body instance for INode pointers
INode * GetNode()
returns the node the callback is registered to
Client & m_Client
The object the method function belongs to.
Member_NodeCallback(INode *pNode, Client &client, Member member, ECallbackType CallbackType)
Constructor.
enum GENAPI_NAMESPACE::_ECallbackType ECallbackType
the type of callback
INode * m_pNode
the node were the callback is installed
CNodeCallback(INode *pNode, ECallbackType CallbackType)
const Function m_pFunction
the callback function
Container for a member function pointer.
virtual void operator()(ECallbackType CallbackType) const =0
fires the callback if the type is right
intptr_t CallbackHandleType
the callback handle for nodes
virtual void Destroy()=0
destroys the object
intptr_t Register(INode *pNode, Function f, ECallbackType CallbackType=cbPostInsideLock)
Register a C-function as a callback.
GENAPI_DECL void Deregister(GENAPI_NAMESPACE::CallbackHandleType pCallbackInfo)
Unregistering callback by handle.
Function_NodeCallback(INode *pNode, const Function &function, ECallbackType CallbackType)
Constructor.
virtual void operator()(ECallbackType CallbackType) const
execute operation
CNodeCallback * make_NodeCallback(INode *pNode, Function function, ECallbackType CallbackType)
make a new callback object for C functions
interface GENAPI_DECL_ABSTRACT INode
Interface common to all nodes.
Container for a function pointer.
Part of the generic device API.
callback is fired on leaving the tree inside the lock-guarded area
virtual ~CNodeCallback()
virtual destructor