35#ifndef GENAPI_NODECALLBACK_H
36#define GENAPI_NODECALLBACK_H
39namespace GENAPI_NAMESPACE
93 template <
class Function>
100 m_pFunction( function )
118 const Function m_pFunction;
130 template <
class Function>
143 template<
class Function>
147 return pNode->RegisterCallback(pCallback);
159 template <
class Client,
class Member>
170 m_pMemberFunc(member)
177 (m_Client.*m_pMemberFunc)(
m_pNode );
191 PMEMBERFUNC m_pMemberFunc;
203 template <
class Client,
class Member>
215 template<
class Client,
class Member>
219 return pNode->RegisterCallback(pCallback);
225 GENAPI_DECL
void Deregister (GENAPI_NAMESPACE::CallbackHandleType pCallbackInfo );
Definition of interface INode and types NodeList_t and CallbackHandleType:
enum GENAPI_NAMESPACE::_ECallbackType ECallbackType
the type of callback
_ECallbackType
the type of callback
Definition NodeCallback.h:44
@ cbPostOutsideLock
‍callback is fired on leaving the tree inside the lock-guarded area
Definition NodeCallback.h:46
GENAPI_DECL void Deregister(GENAPI_NAMESPACE::CallbackHandleType pCallbackInfo)
Unregistering callback by handle.
callback body instance for INode pointers
Definition NodeCallback.h:54
INode * GetNode()
returns the node the callback is registered to
Definition NodeCallback.h:72
virtual ~CNodeCallback()
virtual destructor
Definition NodeCallback.h:62
virtual void Destroy()=0
destroys the object
virtual void operator()(ECallbackType CallbackType) const =0
fires the callback if the type is right
ECallbackType m_CallbackType
the type of the callback
Definition NodeCallback.h:82
INode * m_pNode
the node were the callback is installed
Definition NodeCallback.h:79
Container for a function pointer.
Definition NodeCallback.h:95
virtual void operator()(ECallbackType CallbackType) const
execute operation: call the function
Definition NodeCallback.h:104
Function_NodeCallback(INode *pNode, const Function &function, ECallbackType CallbackType)
Constructor.
Definition NodeCallback.h:98
virtual void Destroy()
destroys the object
Definition NodeCallback.h:111
Container for a member function pointer.
Definition NodeCallback.h:161
virtual void operator()(ECallbackType CallbackType) const
execute operation
Definition NodeCallback.h:174
Member_NodeCallback(INode *pNode, Client &client, Member member, ECallbackType CallbackType)
Constructor.
Definition NodeCallback.h:167
void(Client::* PMEMBERFUNC)(INode *)
Member function type.
Definition NodeCallback.h:164
virtual void Destroy()
destroys the object
Definition NodeCallback.h:181
CNodeCallback * make_NodeCallback(INode *pNode, Function function, ECallbackType CallbackType)
make a new callback object for C functions
Definition NodeCallback.h:131
GENICAM_INTERFACE INode
Interface common to all nodes.
Definition ICategory.h:49
intptr_t Register(INode *pNode, Function f, ECallbackType CallbackType=cbPostInsideLock)
Register a C-function as a callback.
Definition NodeCallback.h:144