Nymph
v1.5.2
Flow-Based Data Processing Framework
|
Creates a slot that calls a member function of the func_owner_type object, taking one argument. More...
#include <KTSlot.hh>
Public Types | |
typedef boost::function< Signature > | function_signature |
typedef function_signature::result_type | return_type |
typedef function_signature::argument_type | argument_type |
Public Member Functions | |
template<class XFuncOwnerType > | |
KTSlotOneArg (const std::string &name, XFuncOwnerType *owner, return_type(XFuncOwnerType::*func)(argument_type)) | |
Constructor for the case where the processor has the function that will be called by the slot. More... | |
template<class XFuncOwnerType > | |
KTSlotOneArg (const std::string &name, KTProcessor *proc, XFuncOwnerType *owner, return_type(XFuncOwnerType::*func)(argument_type)) | |
Constructor for the case where the processor and the object with the function that will be called are different. More... | |
virtual | ~KTSlotOneArg () |
return_type | operator() (argument_type arg) |
Protected Attributes | |
boost::function< Signature > | fFunc |
Creates a slot that calls a member function of the func_owner_type object, taking one argument.
Usage: To use this slot type the function to be called by the slot must exist in an object of type FuncOwnerType. The function should have the signature ReturnType (ArgumentType).
In your Processor's header add a member variable of type KTSlotOneArg< ProcessorType, ArgumentType, ReturnType >. The variable may be private.
Initialize the slot with the name of the slot, the address of the owner of the slot function, and the function pointer. Optionally, if the Processor is separate from the owner of the slot function, the Processor address is specified as the second argument to the constructor.
typedef function_signature::argument_type argument_type |
typedef boost::function< Signature > function_signature |
typedef function_signature::result_type return_type |
KTSlotOneArg | ( | const std::string & | name, |
XFuncOwnerType * | owner, | ||
return_type(XFuncOwnerType::*)(argument_type) | func | ||
) |
KTSlotOneArg | ( | const std::string & | name, |
KTProcessor * | proc, | ||
XFuncOwnerType * | owner, | ||
return_type(XFuncOwnerType::*)(argument_type) | func | ||
) |
|
virtual |
KTSlotOneArg< Signature >::return_type operator() | ( | argument_type | arg | ) |