Logo Search packages:      
Sourcecode: libgdf version File versions  Download package

Public Member Functions | Protected Member Functions | Private Attributes

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 >:
Inheritance graph
Collaboration diagram for gdf::ChannelData< T >:
Collaboration graph

List of all members.

Public Member Functions

void addSample (const T value)
 Add a single sample to the channel. Channel must not be full.
virtual void addSample (const int16)
virtual void addSample (const uint16)
virtual void addSample (const int32)
virtual void addSample (const uint32)
virtual void addSample (const int64)
virtual void addSample (const uint64)
virtual void addSample (const float32)
virtual void addSample (const float64)
virtual void addSample (const int8)
virtual void addSample (const uint8)
void blitSamples (const T *values, const size_t num)
 Blit a given number of samples into channel. That number of samples must be free.
virtual void blitSamples (const float32 *, const size_t)
virtual void blitSamples (const float64 *, const size_t)
virtual void blitSamples (const int8 *, const size_t)
virtual void blitSamples (const uint8 *, const size_t)
virtual void blitSamples (const int16 *, const size_t)
virtual void blitSamples (const uint16 *, const size_t)
virtual void blitSamples (const int32 *, const size_t)
virtual void blitSamples (const uint32 *, const size_t)
virtual void blitSamples (const int64 *, const size_t)
virtual void blitSamples (const uint64 *, const size_t)
 ChannelData (ChannelDataBase *base)
 Copy Constructor.
 ChannelData (size_t length)
virtual void clear ()
 Reset read and write positions.
virtual void fill (const uint32, const size_t)
virtual void fill (const int8, const size_t)
virtual void fill (const uint8, const size_t)
virtual void fill (const int16, const size_t)
virtual void fill (const uint16, const size_t)
virtual void fill (const int32, const size_t)
virtual void fill (const int64, const size_t)
virtual void fill (const uint64, const size_t)
virtual void fill (const float32, const size_t)
virtual void fill (const float64, const size_t)
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 fromstream (std::istream &in)
size_t getFree ()
 Get number of free samples.
virtual int64 getSample (size_t, int64)
getSample (size_t pos, T)
 get sapmle value
virtual uint64 getSample (size_t, uint64)
virtual uint16 getSample (size_t, uint16)
virtual float32 getSample (size_t, float32)
virtual float64 getSample (size_t, float64)
virtual int32 getSample (size_t, int32)
virtual uint32 getSample (size_t, uint32)
virtual int8 getSample (size_t, int8)
virtual int16 getSample (size_t, int16)
virtual uint8 getSample (size_t, uint8)
virtual size_t getWritten ()
 Get number of written samples.
virtual void setSample (size_t, int32)
virtual void setSample (size_t, uint32)
virtual void setSample (size_t, int8)
virtual void setSample (size_t, float64)
virtual void setSample (size_t, uint64)
virtual void setSample (size_t, int64)
virtual void setSample (size_t, int16)
virtual void setSample (size_t, float32)
virtual void setSample (size_t, uint8)
void setSample (size_t pos, T rawval)
 set sapmle value
virtual void setSample (size_t, uint16)
void tostream (std::ostream &out)
virtual ~ChannelData ()

Protected Member Functions

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

Private Attributes

std::vector< T > m_data
size_t m_writepos

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:

Generated by  Doxygen 1.6.0   Back to index