Signbit MPSCQ  0.5.0
Public Member Functions | List of all members
sbit::mpscq::ProcessorBase Class Referenceabstract

#include <mpscq.h>

Inheritance diagram for sbit::mpscq::ProcessorBase:
Inheritance graph
[legend]

Public Member Functions

 ProcessorBase (Queue &queue)
 
virtual void processElement (Queue::Envelope *envelope)=0
 
virtual void afterBatch ()
 
virtual void onIdle ()
 
void startProcessing ()
 
void interrupt ()
 
 ProcessorBase (const ProcessorBase &other)=delete
 
ProcessorBaseoperator= (const ProcessorBase &other)=delete
 
 ProcessorBase (ProcessorBase &&other)=delete
 
ProcessorBaseoperator= (ProcessorBase &&other)=delete
 

Detailed Description

Base class encapsulating the event loop of a consumer or processor

Constructor & Destructor Documentation

◆ ProcessorBase()

sbit::mpscq::ProcessorBase::ProcessorBase ( Queue queue)
inlineexplicit

Constructs a processor that consumes elements from a queue

Parameters
queueIs the queue from which elements are consumed

Member Function Documentation

◆ afterBatch()

virtual void sbit::mpscq::ProcessorBase::afterBatch ( )
inlinevirtual

Called after each batch of elements is processed

Returns
nothing

◆ interrupt()

void sbit::mpscq::ProcessorBase::interrupt ( )
inline

Interrupts the "infinite" event loop

◆ onIdle()

virtual void sbit::mpscq::ProcessorBase::onIdle ( )
inlinevirtual

Called when a new batch was requested, but no new elements were available

Returns
nothing

◆ processElement()

virtual void sbit::mpscq::ProcessorBase::processElement ( Queue::Envelope envelope)
pure virtual

Called for each element popped from the queue

Parameters
envelopePoints to the element to be processed
Returns
nothing

◆ startProcessing()

void sbit::mpscq::ProcessorBase::startProcessing ( )
inline

Begin the "infinite" event loop


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