libGDF
gdf::ChannelData< T > Class Template Reference

Contains data samples for a channel of given type and length. More...

#include <ChannelData.h>

+ Inheritance diagram for gdf::ChannelData< T >:
+ Collaboration diagram for gdf::ChannelData< T >:

Public Member Functions

 ChannelData (size_t length)
 Constructor.
 ChannelData (ChannelDataBase *base)
 Copy Constructor.
virtual ~ChannelData ()
 Destructor.
void addSample (const T value)
 Add a single sample to the channel. Channel must not be full.
void blitSamples (const T *values, const size_t num)
 Blit a given number of samples into channel. That number of samples must be free.
void fill (const T value, const size_t num)
 Fills a given number of samples with value. That number of samples must be free.
void setSample (size_t pos, T rawval)
 set sapmle value
getSample (size_t pos, T)
 get sapmle value
virtual void clear ()
 Reset read and write positions.
size_t getFree ()
 Get number of free samples.
virtual size_t getWritten ()
 Get number of written samples.
void tostream (std::ostream &out)
 Serializer.
void fromstream (std::istream &in)
 Deserializer.

Protected Member Functions

std::vector< T > & getData ()
 Get reference to data.
std::vector< T > * getDataPtr ()
 Get pointer to data.

Detailed Description

template<typename T>
class gdf::ChannelData< T >

Contains data samples for a channel of given type and length.

Only access functions of type T are reimplemented from ChannelDataBase. Calling addSample(), blitSamples() or fill() with the wrong data type throws an exception.

Definition at line 36 of file ChannelData.h.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables Friends