Nymph  v1.5.2
Flow-Based Data Processing Framework
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KTDataQueueProcessorTemplate< XProcessorType > Class Template Referenceabstract

Template class for creating data queueing processors. More...

#include <KTDataQueueProcessor.hh>

Inheritance diagram for KTDataQueueProcessorTemplate< XProcessorType >:
Inheritance graph

Classes

struct  DataAndFunc
 

Public Types

enum  Status { kStopped, kRunning, kContinue }
 
typedef KTConcurrentQueue< DataAndFuncQueue
 
typedef bool(KTConcurrentQueue< DataAndFunc >::* QueuePoppingFunc) (DataAndFunc &)
 

Public Member Functions

 KTDataQueueProcessorTemplate (const std::string &name="default-data-queue-proc-template-name")
 
virtual ~KTDataQueueProcessorTemplate ()
 
bool Configure (const scarab::param_node &node)
 Should perform parameter store and command-line configurations. More...
 
virtual bool ConfigureSubClass (const scarab::param_node &node)=0
 
Status GetStatus () const
 
void SetStatus (KTDataQueueProcessorTemplate< XProcessorType >::Status)
 
void SetFuncPtr (void(XProcessorType::*ptr)(KTDataPtr))
 
bool Run ()
 Begins processing of queue (switches status from kStopped to kRunning) More...
 
void Stop ()
 Stops processing of queue (switches status to kStopped) More...
 
bool ProcessQueue ()
 Begins processing of queue if status is already kRunning; otherwise does nothing. More...
 
void ClearQueue ()
 
void SwitchToTimedPop ()
 
void SwitchToUntimedPop ()
 
void SwitchToSinglePop ()
 
- Public Member Functions inherited from KTPrimaryProcessor
 KTPrimaryProcessor (const std::string &name="default-primary-processor-name")
 
virtual ~KTPrimaryProcessor ()
 
virtual void operator() ()
 Callable function used by boost::thread. More...
 
- Public Member Functions inherited from KTProcessor
 KTProcessor (const std::string &name="default-proc-name")
 
virtual ~KTProcessor ()
 
void ConnectASlot (const std::string &signalName, KTProcessor *processor, const std::string &slotName, int groupNum=-1)
 
void ConnectASignal (KTProcessor *processor, const std::string &signalName, const std::string &slotName, int groupNum=-1)
 
void ConnectSignalToSlot (KTSignalWrapper *signal, KTSlotWrapper *slot, int groupNum=-1)
 
template<class XProcessor >
void RegisterSignal (std::string name, XProcessor *signalPtr)
 
template<class XTarget , typename XReturn >
void RegisterSlot (std::string name, XTarget *target, XReturn(XTarget::*funcPtr)())
 
template<class XTarget , typename XReturn , typename XArg1 >
void RegisterSlot (std::string name, XTarget *target, XReturn(XTarget::*funcPtr)(XArg1))
 
template<class XTarget , typename XReturn , typename XArg1 , typename XArg2 >
void RegisterSlot (std::string name, XTarget *target, XReturn(XTarget::*funcPtr)(XArg1, XArg2))
 
KTSignalWrapperGetSignal (const std::string &name)
 
KTSlotWrapperGetSlot (const std::string &name)
 
template<typename XSignalSig >
void RegisterSignal (std::string name, XSignalSig *signalPtr)
 
- Public Member Functions inherited from KTConfigurable
 KTConfigurable (const std::string &name="default-name")
 
virtual ~KTConfigurable ()
 
bool Configure (const std::string &config)
 Implement the option for calling Configure without passing a parameter store node. More...
 
const std::string & GetConfigName () const
 
void SetConfigName (const std::string &name)
 

Protected Member Functions

void DoQueueData (KTDataPtr &data, void(XProcessorType::*func)(KTDataPtr))
 

Protected Attributes

Status fStatus
 
void(XProcessorType::* fFuncPtr )(KTDataPtr)
 
Queue fQueue
 
QueuePoppingFunc fPopFromQueue
 
KTSignalOneArg< void > fQueueDoneSignal
 
- Protected Attributes inherited from KTProcessor
SignalMap fSignalMap
 
SlotMap fSlotMap
 
- Protected Attributes inherited from KTConfigurable
KTCommandLineHandlerfCLHandler
 
std::string fConfigName
 

Additional Inherited Members

- Protected Types inherited from KTProcessor
typedef std::map< std::string, KTSignalWrapper *> SignalMap
 
typedef SignalMap::iterator SigMapIt
 
typedef SignalMap::value_type SigMapVal
 
typedef std::map< std::string, KTSlotWrapper *> SlotMap
 
typedef SlotMap::iterator SlotMapIt
 
typedef SlotMap::value_type SlotMapVal
 

Detailed Description

template<class XProcessorType>
class Nymph::KTDataQueueProcessorTemplate< XProcessorType >

Template class for creating data queueing processors.

Author
N. S. Oblath

Available configuration values:

Slots:

Signals:

Definition at line 46 of file KTDataQueueProcessor.hh.

Member Typedef Documentation

◆ Queue

Definition at line 55 of file KTDataQueueProcessor.hh.

◆ QueuePoppingFunc

typedef bool(KTConcurrentQueue< DataAndFunc >::* QueuePoppingFunc) (DataAndFunc &)

Definition at line 57 of file KTDataQueueProcessor.hh.

Member Enumeration Documentation

◆ Status

enum Status
Enumerator
kStopped 
kRunning 
kContinue 

Definition at line 59 of file KTDataQueueProcessor.hh.

Constructor & Destructor Documentation

◆ KTDataQueueProcessorTemplate()

KTDataQueueProcessorTemplate ( const std::string &  name = "default-data-queue-proc-template-name")

Definition at line 199 of file KTDataQueueProcessor.hh.

◆ ~KTDataQueueProcessorTemplate()

Definition at line 213 of file KTDataQueueProcessor.hh.

Member Function Documentation

◆ ClearQueue()

void ClearQueue ( )

Definition at line 284 of file KTDataQueueProcessor.hh.

◆ Configure()

bool Configure ( const scarab::param_node &  node)
virtual

Should perform parameter store and command-line configurations.

Implements KTConfigurable.

Definition at line 219 of file KTDataQueueProcessor.hh.

◆ ConfigureSubClass()

virtual bool ConfigureSubClass ( const scarab::param_node &  node)
pure virtual

Implemented in KTDataQueueProcessor.

◆ DoQueueData()

void DoQueueData ( KTDataPtr data,
void(XProcessorType::*)(KTDataPtr func 
)
protected

Queue an data object Assumes ownership of the data; original shared pointer will be nullified

Definition at line 297 of file KTDataQueueProcessor.hh.

◆ GetStatus()

Status GetStatus ( ) const

◆ ProcessQueue()

bool ProcessQueue ( )

Begins processing of queue if status is already kRunning; otherwise does nothing.

Definition at line 253 of file KTDataQueueProcessor.hh.

◆ Run()

bool Run ( )
virtual

Begins processing of queue (switches status from kStopped to kRunning)

Implements KTPrimaryProcessor.

Definition at line 228 of file KTDataQueueProcessor.hh.

◆ SetFuncPtr()

void SetFuncPtr ( void(XProcessorType::*)(KTDataPtr ptr)

Definition at line 245 of file KTDataQueueProcessor.hh.

◆ SetStatus()

void SetStatus ( KTDataQueueProcessorTemplate< XProcessorType >::Status  )

◆ Stop()

void Stop ( )

Stops processing of queue (switches status to kStopped)

Definition at line 236 of file KTDataQueueProcessor.hh.

◆ SwitchToSinglePop()

void SwitchToSinglePop ( )

Definition at line 362 of file KTDataQueueProcessor.hh.

◆ SwitchToTimedPop()

void SwitchToTimedPop ( )

Queue a list of data objects Assumes ownership of all data objects and the list; original shared pointers will be nullified

Definition at line 328 of file KTDataQueueProcessor.hh.

◆ SwitchToUntimedPop()

void SwitchToUntimedPop ( )

Definition at line 345 of file KTDataQueueProcessor.hh.

Member Data Documentation

◆ fFuncPtr

void(XProcessorType::* fFuncPtr) (KTDataPtr)
protected

Definition at line 86 of file KTDataQueueProcessor.hh.

◆ fPopFromQueue

QueuePoppingFunc fPopFromQueue
protected

Definition at line 106 of file KTDataQueueProcessor.hh.

◆ fQueue

Queue fQueue
protected

Definition at line 105 of file KTDataQueueProcessor.hh.

◆ fQueueDoneSignal

KTSignalOneArg< void > fQueueDoneSignal
protected

Definition at line 132 of file KTDataQueueProcessor.hh.

◆ fStatus

Status fStatus
protected

Definition at line 77 of file KTDataQueueProcessor.hh.


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