LASP 1.0
Library for Acoustic Signal Processing
|
A bit of curiously recurring template pattern, to connect the specific handlers and connect the proper callbacks in a type-agnostic way. Using this class, each threaded handler should just implement its reset() and inCallback() method. Ellides the virtual method calls. More...
#include <lasp_threadedindatahandler.h>
Public Member Functions | |
ThreadedInDataHandler (SmgrHandle mgr) | |
void | _reset (const Daq *daq) |
void | _inCallback (const DaqData &data) |
Public Member Functions inherited from ThreadedInDataHandlerBase | |
ThreadedInDataHandlerBase (SmgrHandle mgr, InCallbackType cb, InResetType reset) | |
~ThreadedInDataHandlerBase () | |
void | startThread () |
This method should be called from the derived class' constructor, to start the thread and data is incoming. | |
void | stopThread () |
This method SHOULD be called from all classes that derive on ThreadedInDataHandler. It is to make sure the inCallback_threaded() function is no longer called when the destructor of the derived class is called. Not calling this function is regarded as a BUG. | |
A bit of curiously recurring template pattern, to connect the specific handlers and connect the proper callbacks in a type-agnostic way. Using this class, each threaded handler should just implement its reset() and inCallback() method. Ellides the virtual method calls.
Usage: class XHandler: public ThreadedInDataHandler<XHandler> { public: XHandler(streammgr) : ThreadedInDataHandler(streammgr) {} void inCallback(const DaqData& d) { ... do something with d } void reset(const Daq* daq) { ... do something with daq } };
For examples, see PPMHandler, etc.
Derived | The |
Definition at line 96 of file lasp_threadedindatahandler.h.
|
inline |
Definition at line 98 of file lasp_threadedindatahandler.h.
|
inline |
Definition at line 110 of file lasp_threadedindatahandler.h.
|
inline |
Definition at line 106 of file lasp_threadedindatahandler.h.