NSCore::DataSetProducer Class Reference

Baseclass for Producers. More...

#include <datasetchain.h>

Inheritance diagram for NSCore::DataSetProducer:

NSCore::QTreeItem QObject NSCore::PointerProtection_Skel DopplerProducer NSAcqiris::Digitizer NSCore::DataSetChainMember NSCore::GaussProducer NSDiskIO::AbstractReader NSDiskIO::AbstractWriter NSEvaluation::EvaluationPath OsciWidgetV3_ChainMember ResultsToSpectrum GageReader NSDiskIO::AcqirisLiveReader NSDiskIO::EPOSBinReader NSDiskIO::EPOSReader NSDiskIO::PragReader
Collaboration diagram for NSCore::DataSetProducer:

Collaboration graph

List of all members.

Public Types

enum  Dispatching { DispatchToAll, DispatchEqual }


void countsPerSecond (double)

Public Member Functions

 DataSetProducer (QObject *=0)
 empty constructor
 ~DataSetProducer ()
void registerConsumer (DataSetChainMember *)
 Register a consumer.
void unregisterConsumer (DataSetChainMember *)
 Unregister a consumer.
void unregisterAllConsumers ()
 Unregister all consumers.
void setDispatching (Dispatching)
int consumersSize () const
 Return the number of registered consumers.
bool consumersIsEmpty () const
 Return wether there are consumers or not.

Protected Member Functions

void enqueue (AcqisitionDataSet &)
 Add data to the queue.

Private Attributes

DataSetProducerPrivate * _d

Detailed Description

Baseclass for Producers.

Subclass to produce AcquisitionDataSets and feed them into a chain.

Member Enumeration Documentation


Constructor & Destructor Documentation

NSCore::DataSetProducer::DataSetProducer ( QObject = 0  ) 

empty constructor

NSCore::DataSetProducer::~DataSetProducer (  ) 


Deregisters itself at the consumers.

Member Function Documentation

void NSCore::DataSetProducer::registerConsumer ( DataSetChainMember  ) 

Register a consumer.

This registers a DataSetChainMember as this objects consumer.

The emitted data is sent to all consumers via the (internal) DataSetEvent through Qt's event system.

void NSCore::DataSetProducer::unregisterConsumer ( DataSetChainMember  ) 

Unregister a consumer.

void NSCore::DataSetProducer::unregisterAllConsumers (  ) 

Unregister all consumers.

void NSCore::DataSetProducer::setDispatching ( Dispatching   ) 

int NSCore::DataSetProducer::consumersSize (  )  const

Return the number of registered consumers.

This way a producer can decide not to do expensive conversions and similar stuff when there is no consumer to actually use the data.

bool NSCore::DataSetProducer::consumersIsEmpty (  )  const

Return wether there are consumers or not.

Even simplier then consumersSize().

Referenced by NSAcqiris::DigitizerThread::run().

void NSCore::DataSetProducer::countsPerSecond ( double   )  [signal]


The enqueue()-function tries to keep track on how many datasets where sent to the next chain-member and will emit this signal at (ir-)regular intervals.

void NSCore::DataSetProducer::enqueue ( AcqisitionDataSet  )  [protected]

Add data to the queue.

The data is sent to all registered consumers via Qt' event system.

Member Data Documentation

DataSetProducerPrivate* NSCore::DataSetProducer::_d [private]

Internal pointer

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

Generated on Tue Apr 12 02:10:25 2011 for epos by  doxygen 1.5.5