Public Member Functions | List of all members
imeas::TDiscreteDataSequence< Element > Class Template Reference

#include <TDiscreteDataSequence.h>

Inheritance diagram for imeas::TDiscreteDataSequence< Element >:
imeas::IDiscreteDataSequence imeas::IDataSequence iser::ISerializable istd::IChangeable istd::IPolymorphic

Public Member Functions

 TDiscreteDataSequence ()
 
virtual bool CreateDiscreteSequence (int samplesCount, void *dataPtr, bool releaseFlag, int sampleDiff, int channelDiff, int sampleDepth, int channelsCount=1)
 Create container for sample sequence using external samples buffer. More...
 
virtual bool CreateDiscreteSequenceWithInfo (const istd::TTransPtr< const IDataSequenceInfo > &infoPtr, int samplesCount, void *dataPtr, bool releaseFlag, int sampleDiff, int channelDiff, int sampleDepth, int channelsCount=1)
 Create container for sample sequence with additional sequence info using external samples buffer. More...
 
virtual int GetSampleDepth () const
 Get number of bits used to represent single sample. More...
 
virtual quint32 GetDiscreteSample (int position, int channel=0) const
 Get discrete sample at specified position. More...
 
virtual bool SetDiscreteSample (int position, int channel, quint32 sample)
 Set discrete sample at specified position. More...
 
virtual bool CreateSequence (int samplesCount, int channelsCount=1)
 Create container for sample sequence with specified number of samples, channels and sample depth. More...
 
virtual bool CreateSequenceWithInfo (const istd::TTransPtr< const IDataSequenceInfo > &infoPtr, int samplesCount=-1, int channelsCount=-1)
 Create sequence and set the info object. More...
 
virtual const IDataSequenceInfoGetSequenceInfo () const
 Get additional information about this sequence. More...
 
virtual bool IsEmpty () const
 Return true if this sequence has no sample. More...
 
virtual void ResetSequence ()
 Reset this sequence. More...
 
virtual int GetSamplesCount () const
 Get size of this raster sequence. More...
 
virtual int GetChannelsCount () const
 Get number of channels. More...
 
virtual double GetSample (int index, int channel=0) const
 Get sample value at specified index. More...
 
virtual void SetSample (int index, int channel, double value)
 Set sample value at specified index. More...
 
virtual bool Serialize (iser::IArchive &archive)
 
virtual bool CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 

Detailed Description

template<typename Element>
class imeas::TDiscreteDataSequence< Element >

Definition at line 31 of file TDiscreteDataSequence.h.

Constructor & Destructor Documentation

template<typename Element >
imeas::TDiscreteDataSequence< Element >::TDiscreteDataSequence ( )

Definition at line 96 of file TDiscreteDataSequence.h.

Member Function Documentation

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::CopyFrom ( const istd::IChangeable object,
CompatibilityMode  mode = CM_WITHOUT_REFS 
)
virtual
template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::CreateDiscreteSequence ( int  samplesCount,
void *  dataPtr,
bool  releaseFlag,
int  sampleDiff,
int  channelDiff,
int  sampleDepth,
int  channelsCount = 1 
)
virtual

Create container for sample sequence using external samples buffer.

Parameters
samplesCountnumber of samples.
dataPtrpointer to external buffer.
releaseFlagif its true, external buffer will be managed (removed) by this object.
sampleDiffaddress difference between next and previos sample. If it equals 0, the value will be taken from number of samples, number of channels and channelDiff.
channelDiffaddress difference between next and previos sample. If it equals 0, the value will be calculated from number of bits per single sample.
sampleDepthnumber of bits used for representation of a single sample.
channelsCountnumber of channels.
Returns
true if sample sequence was created correctly.

Implements imeas::IDiscreteDataSequence.

Definition at line 110 of file TDiscreteDataSequence.h.

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::CreateDiscreteSequenceWithInfo ( const istd::TTransPtr< const IDataSequenceInfo > &  infoPtr,
int  samplesCount,
void *  dataPtr,
bool  releaseFlag,
int  sampleDiff,
int  channelDiff,
int  sampleDepth,
int  channelsCount = 1 
)
virtual

Create container for sample sequence with additional sequence info using external samples buffer.

Parameters
infoPtrsequence info object.
samplesCountnumber of samples.
dataPtrpointer to external buffer.
releaseFlagif its true, external buffer will be managed (removed) by this object.
sampleDiffaddress difference between next and previos sample. If it equals 0, the value will be taken from number of samples, number of channels and channelDiff.
channelDiffaddress difference between next and previos sample. If it equals 0, the value will be calculated from number of bits per single sample.
sampleDepthnumber of bits used for representation of a single sample.
channelsCountnumber of channels.
Returns
true if sample sequence was created correctly.

Implements imeas::IDiscreteDataSequence.

Definition at line 136 of file TDiscreteDataSequence.h.

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::CreateSequence ( int  samplesCount,
int  channelsCount = 1 
)
virtual

Create container for sample sequence with specified number of samples, channels and sample depth.

Parameters
samplesCountnumber of samples.
channelsCountnumber of channels.
Returns
true if sample sequence was created correctly.

Implements imeas::IDataSequence.

Definition at line 182 of file TDiscreteDataSequence.h.

References imeas::IDataSequenceInfo::SIF_CHANNELS_COUNT_FIXED, and imeas::IDataSequenceInfo::SIF_SAMPLES_COUNT_FIXED.

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::CreateSequenceWithInfo ( const istd::TTransPtr< const IDataSequenceInfo > &  infoPtr,
int  samplesCount = -1,
int  channelsCount = -1 
)
virtual

Create sequence and set the info object.

Parameters
infoPtrsequence info object.
samplesCountnumber of samples. If it is negative, default value will be taken.
channelsCountnumber of channels. If it is negative, default value will be taken.

Implements imeas::IDataSequence.

Definition at line 223 of file TDiscreteDataSequence.h.

template<typename Element >
int imeas::TDiscreteDataSequence< Element >::GetChannelsCount ( ) const
virtual

Get number of channels.

Implements imeas::IDataSequence.

Definition at line 266 of file TDiscreteDataSequence.h.

template<typename Element >
quint32 imeas::TDiscreteDataSequence< Element >::GetDiscreteSample ( int  position,
int  channel = 0 
) const
virtual

Get discrete sample at specified position.

Parameters
positionposition, must be inside of returned size.

Implements imeas::IDiscreteDataSequence.

Definition at line 160 of file TDiscreteDataSequence.h.

template<typename Element >
double imeas::TDiscreteDataSequence< Element >::GetSample ( int  index,
int  channel = 0 
) const
virtual

Get sample value at specified index.

Implements imeas::IDataSequence.

Definition at line 273 of file TDiscreteDataSequence.h.

template<typename Element >
int imeas::TDiscreteDataSequence< Element >::GetSampleDepth ( ) const
virtual

Get number of bits used to represent single sample.

Implements imeas::IDiscreteDataSequence.

Definition at line 153 of file TDiscreteDataSequence.h.

template<typename Element >
int imeas::TDiscreteDataSequence< Element >::GetSamplesCount ( ) const
virtual

Get size of this raster sequence.

Implements imeas::IDataSequence.

Definition at line 259 of file TDiscreteDataSequence.h.

template<typename Element >
const IDataSequenceInfo * imeas::TDiscreteDataSequence< Element >::GetSequenceInfo ( ) const
virtual

Get additional information about this sequence.

Implements imeas::IDataSequence.

Definition at line 235 of file TDiscreteDataSequence.h.

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::IsEmpty ( ) const
virtual

Return true if this sequence has no sample.

Implements imeas::IDataSequence.

Definition at line 242 of file TDiscreteDataSequence.h.

template<typename Element >
void imeas::TDiscreteDataSequence< Element >::ResetSequence ( )
virtual

Reset this sequence.

After this operation sequence is set to initial state.

Implements imeas::IDataSequence.

Definition at line 249 of file TDiscreteDataSequence.h.

template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::Serialize ( iser::IArchive archive)
virtual
template<typename Element >
bool imeas::TDiscreteDataSequence< Element >::SetDiscreteSample ( int  position,
int  channel,
quint32  sample 
)
virtual

Set discrete sample at specified position.

Parameters
positionposition, must be inside of returned size.
channelsample channel.
samplesample value will be set.
Returns
true, if sample was changed.

Implements imeas::IDiscreteDataSequence.

Definition at line 169 of file TDiscreteDataSequence.h.

template<typename Element >
void imeas::TDiscreteDataSequence< Element >::SetSample ( int  index,
int  channel,
double  value 
)
virtual

Set sample value at specified index.

Implements imeas::IDataSequence.

Definition at line 282 of file TDiscreteDataSequence.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy