Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends

alize::FeatureFileReaderRaw Class Reference

#include <FeatureFileReaderRaw.h>

Inheritance diagram for alize::FeatureFileReaderRaw:
Inheritance graph
[legend]
Collaboration diagram for alize::FeatureFileReaderRaw:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FeatureFileReaderRaw (const FileName &f, const Config &c, LabelServer *ls=NULL, BigEndian be=BIGENDIAN_AUTO, BufferUsage b=BUFFER_AUTO, unsigned long bufferSize=0, HistoricUsage=ALL_FEATURES, unsigned long historicSize=0)
virtual ~FeatureFileReaderRaw ()
virtual unsigned long getFeatureCount ()
virtual unsigned long getVectSize ()
virtual const FeatureFlagsgetFeatureFlags ()
virtual real_t getSampleRate ()
virtual String getClassName () const

Static Public Member Functions

static FeatureFileReaderRawcreate (const FileName &, const Config &, LabelServer *=NULL, BigEndian=BIGENDIAN_AUTO, BufferUsage=BUFFER_AUTO, unsigned long bufferSize=0, HistoricUsage=ALL_FEATURES, unsigned long historicSize=0)

Private Member Functions

bool operator== (const FeatureFileReaderRaw &) const
bool operator!= (const FeatureFileReaderRaw &) const
const FeatureFileReaderRawoperator= (const FeatureFileReaderRaw &)
 FeatureFileReaderRaw (const FeatureFileReaderRaw &)

Private Attributes

bool _featureCountDefined

Friends

class TestFeatureFileReaderRaw

Detailed Description

Convenient class for reading features from a raw file The file is opened only after calling one of the methods readFeature, get FeatureCount, getVectSize, getFeatureFlags

Author:
Frederic Wils frederic.wils@lia.univ-avignon.fr
Version:
1.0
Date:
2003

Definition at line 86 of file FeatureFileReaderRaw.h.


Constructor & Destructor Documentation

alize::FeatureFileReaderRaw::FeatureFileReaderRaw ( const FileName f,
const Config c,
LabelServer ls = NULL,
BigEndian  be = BIGENDIAN_AUTO,
BufferUsage  b = BUFFER_AUTO,
unsigned long  bufferSize = 0,
HistoricUsage  = ALL_FEATURES,
unsigned long  historicSize = 0 
)

Creates a reader for a feature file.

Parameters:
fa file to read. No path is required. It uses the parameter "featureFilesPath" of the configuration.
cthe configuration to use
lsaddress of a label server. can be NULL.
bebig endian ? Can be BIGENDIAN_AUTO, BIGENDIAN_TRUE or BIGENDIAN_FALSE
virtual alize::FeatureFileReaderRaw::~FeatureFileReaderRaw (  ) [virtual]
alize::FeatureFileReaderRaw::FeatureFileReaderRaw ( const FeatureFileReaderRaw  ) [private]

Not implemented


Member Function Documentation

static FeatureFileReaderRaw& alize::FeatureFileReaderRaw::create ( const FileName ,
const Config ,
LabelServer = NULL,
BigEndian  = BIGENDIAN_AUTO,
BufferUsage  = BUFFER_AUTO,
unsigned long  bufferSize = 0,
HistoricUsage  = ALL_FEATURES,
unsigned long  historicSize = 0 
) [static]

See constructor with same parameters

virtual String alize::FeatureFileReaderRaw::getClassName (  ) const [virtual]

Returns the name of the class

Returns:
the name of the class of the object as a String

Implements alize::FeatureInputStream.

virtual unsigned long alize::FeatureFileReaderRaw::getFeatureCount (  ) [virtual]

Returns the number of features in the file.
Slow : requires to open and close all files !

Returns:
the number of features in the file
Exceptions:
Exceptionif vectSize is 0
IOExceptionif an I/O error occurs
InvalidDataExceptionthrown if file length % vectSize is not equal to 0.

Implements alize::FeatureInputStream.

virtual const FeatureFlags& alize::FeatureFileReaderRaw::getFeatureFlags (  ) [virtual]

Returns the feature flags of this stream.

Returns:
the feature flags of this stream
Exceptions:
IOExceptionif an I/O error occurs
FileNotFoundException

Implements alize::FeatureInputStream.

virtual real_t alize::FeatureFileReaderRaw::getSampleRate (  ) [virtual]

Returns the sample rate of this stream.

Returns:
the sample rate of this stream
Exceptions:
IOExceptionif an I/O error occurs
FileNotFoundException

Implements alize::FeatureInputStream.

virtual unsigned long alize::FeatureFileReaderRaw::getVectSize (  ) [virtual]

Returns the size of the vector inside each feature of the stream.

Returns:
the size of the vector inside each feature of the stream
Exceptions:
IOExceptionif an I/O error occurs
FileNotFoundException

Implements alize::FeatureInputStream.

bool alize::FeatureFileReaderRaw::operator!= ( const FeatureFileReaderRaw  ) const [private]

Not implemented

const FeatureFileReaderRaw& alize::FeatureFileReaderRaw::operator= ( const FeatureFileReaderRaw  ) [private]

Not implemented

bool alize::FeatureFileReaderRaw::operator== ( const FeatureFileReaderRaw  ) const [private]

Friends And Related Function Documentation

friend class TestFeatureFileReaderRaw [friend]

Definition at line 88 of file FeatureFileReaderRaw.h.


Member Data Documentation

Definition at line 151 of file FeatureFileReaderRaw.h.


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