Nymph  v1.5.2
Flow-Based Data Processing Framework
Public Types | Public Member Functions | Protected Attributes | List of all members
KTSlotOneArg< Signature > Class Template Reference

Creates a slot that calls a member function of the func_owner_type object, taking one argument. More...

#include <KTSlot.hh>

Inheritance diagram for KTSlotOneArg< Signature >:
Inheritance graph

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
 

Detailed Description

template<typename Signature>
class Nymph::KTSlotOneArg< Signature >

Creates a slot that calls a member function of the func_owner_type object, taking one argument.

Author
N. S. Oblath

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.

Definition at line 65 of file KTSlot.hh.

Member Typedef Documentation

◆ argument_type

typedef function_signature::argument_type argument_type

Definition at line 70 of file KTSlot.hh.

◆ function_signature

typedef boost::function< Signature > function_signature

Definition at line 68 of file KTSlot.hh.

◆ return_type

typedef function_signature::result_type return_type

Definition at line 69 of file KTSlot.hh.

Constructor & Destructor Documentation

◆ KTSlotOneArg() [1/2]

KTSlotOneArg ( const std::string &  name,
XFuncOwnerType *  owner,
return_type(XFuncOwnerType::*)(argument_type func 
)

Constructor for the case where the processor has the function that will be called by the slot.

Definition at line 147 of file KTSlot.hh.

◆ KTSlotOneArg() [2/2]

KTSlotOneArg ( const std::string &  name,
KTProcessor proc,
XFuncOwnerType *  owner,
return_type(XFuncOwnerType::*)(argument_type func 
)

Constructor for the case where the processor and the object with the function that will be called are different.

Definition at line 155 of file KTSlot.hh.

◆ ~KTSlotOneArg()

~KTSlotOneArg ( )
virtual

Definition at line 162 of file KTSlot.hh.

Member Function Documentation

◆ operator()()

KTSlotOneArg< Signature >::return_type operator() ( argument_type  arg)

Definition at line 167 of file KTSlot.hh.

Member Data Documentation

◆ fFunc

boost::function< Signature > fFunc
protected

Definition at line 84 of file KTSlot.hh.


The documentation for this class was generated from the following file: