DataConsumer Class Reference

#include <yatephone.h>

Inheritance diagram for DataConsumer:

DataNode RefObject GenObject DataTranslator

List of all members.

Public Member Functions

 DataConsumer (const char *format="slin")
virtual void destroyed ()
virtual void * getObject (const String &name) const
virtual void Consume (const DataBlock &data, unsigned long tStamp)=0
DataSourcegetConnSource () const
DataSourcegetOverSource () const
virtual DataSourcegetTransSource () const

Protected Member Functions

virtual bool synchronize (DataSource *source)

Friends

class DataSource


Detailed Description

A data consumer

Constructor & Destructor Documentation

DataConsumer ( const char *  format = "slin"  )  [inline]

Consumer constructor

Parameters:
format Name of the data format, default "slin" (Signed Linear)


Member Function Documentation

virtual void Consume ( const DataBlock data,
unsigned long  tStamp 
) [pure virtual]

Consumes the data sent to it from a source

Parameters:
data The raw data block to process; an empty block ends data
tStamp Timestamp of data - typically samples

virtual void destroyed (  )  [virtual]

Destruct notification - complains loudly if still attached to a source

Reimplemented from RefObject.

DataSource* getConnSource (  )  const [inline]

Get the data source of this object if it's connected

Returns:
A pointer to the DataSource object or NULL

virtual void* getObject ( const String name  )  const [virtual]

Get a pointer to a derived class given that class name

Parameters:
name Name of the class we are asking for
Returns:
Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from GenObject.

Reimplemented in DataTranslator.

DataSource* getOverSource (  )  const [inline]

Get the override data source of this object if it's connected

Returns:
A pointer to the DataSource object or NULL

virtual DataSource* getTransSource (  )  const [inline, virtual]

Get the data source of a translator object

Returns:
A pointer to the DataSource object or NULL

Reimplemented in DataTranslator.

virtual bool synchronize ( DataSource source  )  [protected, virtual]

Synchronize the consumer with a source

Parameters:
source Data source to copy the timestamp from
Returns:
True if we could synchronize with the source

Reimplemented in DataTranslator.


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

Generated on Sun Dec 7 21:36:12 2008 for Yate by  doxygen 1.5.7.1