#include <FeatureInputStreamModifier.h>


Public Member Functions | |
| FeatureInputStreamModifier (FeatureInputStream &is, const String &m="NO_MASK", bool ownStream=false) | |
| void | setMask (const String &m) |
| virtual bool | readFeature (Feature &f, unsigned long step=1) |
| virtual bool | writeFeature (const Feature &f, unsigned long step=1) |
| virtual unsigned long | getFeatureCount () |
| virtual unsigned long | getVectSize () |
| virtual const FeatureFlags & | getFeatureFlags () |
| virtual real_t | getSampleRate () |
| virtual void | reset () |
| virtual void | close () |
| virtual unsigned long | getSourceCount () |
| virtual unsigned long | getFeatureCountOfASource (unsigned long srcIdx) |
| virtual unsigned long | getFeatureCountOfASource (const String &src) |
| virtual unsigned long | getFirstFeatureIndexOfASource (unsigned long srcIdx) |
| virtual unsigned long | getFirstFeatureIndexOfASource (const String &srcName) |
| virtual const String & | getNameOfASource (unsigned long srcIdx) |
| virtual void | seekFeature (unsigned long featureNbr, const String &srcName) |
| virtual | ~FeatureInputStreamModifier () |
| virtual String | getClassName () const |
| virtual String | toString () const |
Static Public Member Functions | |
| static FeatureInputStreamModifier & | create (FeatureInputStream &is, const String &m="NO_MASK", bool ownStream=false) |
Private Member Functions | |
| void | updateMask (const String &begin, const String &end) |
Private Attributes | |
| FeatureInputStream * | _pInput |
| Feature | _feature |
| String | _mask |
| String | _tmpMask |
| ULongVector | _selection |
| unsigned long | _selectionSize |
| bool | _useMask |
| bool | _ownStream |
Friends | |
| class | TestFeatureInputStreamModifier |
<FRANCAIS>Cette classe représente un flux de features sur lequel il est possible d'agir de différentes façons :
TODO : to complete...
Definition at line 88 of file FeatureInputStreamModifier.h.
| alize::FeatureInputStreamModifier::FeatureInputStreamModifier | ( | FeatureInputStream & | is, |
| const String & | m = "NO_MASK", |
||
| bool | ownStream = false |
||
| ) |
Build the object
| m | the mask |
| is | the input feature stream |
| virtual alize::FeatureInputStreamModifier::~FeatureInputStreamModifier | ( | ) | [virtual] |
| virtual void alize::FeatureInputStreamModifier::close | ( | ) | [virtual] |
Closes the input stream
Implements alize::FeatureInputStream.
| static FeatureInputStreamModifier& alize::FeatureInputStreamModifier::create | ( | FeatureInputStream & | is, |
| const String & | m = "NO_MASK", |
||
| bool | ownStream = false |
||
| ) | [static] |
| virtual String alize::FeatureInputStreamModifier::getClassName | ( | ) | const [virtual] |
Returns the name of the class
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getFeatureCount | ( | ) | [virtual] |
Returns the number of features in the file.
| IOException | if an I/O error occurs |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getFeatureCountOfASource | ( | unsigned long | srcIdx ) | [virtual] |
Returns the feature count of a feature source (a file)
| srcIdx | index of the source |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getFeatureCountOfASource | ( | const String & | src ) | [virtual] |
Returns the feature count of a feature source (a file)
| src | name of the source |
Implements alize::FeatureInputStream.
| virtual const FeatureFlags& alize::FeatureInputStreamModifier::getFeatureFlags | ( | ) | [virtual] |
Returns the feature flags of this stream.
| IOException | if an I/O error occurs |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getFirstFeatureIndexOfASource | ( | const String & | srcName ) | [virtual] |
Returns the number of the first feature of a feature source. Useful for a multiple source stream.
| src | name of the source |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getFirstFeatureIndexOfASource | ( | unsigned long | srcIdx ) | [virtual] |
Returns the number of the first feature of a feature source. Useful for a multiple source stream.
| srcIdx | index of the source |
Implements alize::FeatureInputStream.
| virtual const String& alize::FeatureInputStreamModifier::getNameOfASource | ( | unsigned long | srcIdx ) | [virtual] |
Returns the a particular feature source. Useful for a multiple source stream.
| srcIdx | index of the source |
Implements alize::FeatureInputStream.
| virtual real_t alize::FeatureInputStreamModifier::getSampleRate | ( | ) | [virtual] |
Returns the sample rate of this stream.
| IOException | if an I/O error occurs |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getSourceCount | ( | ) | [virtual] |
Returns the number of sources (files) read by the reader
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureInputStreamModifier::getVectSize | ( | ) | [virtual] |
Returns the size of the vector inside each feature of the stream.
| IOException | if an I/O error occurs |
Implements alize::FeatureInputStream.
| virtual bool alize::FeatureInputStreamModifier::readFeature | ( | Feature & | f, |
| unsigned long | s = 1 |
||
| ) | [virtual] |
Reads a feature in the stream and move the pointer s step forward
| f | the feature to store the data read |
| s | step (default value = 1) |
| IOException | if an I/O error occurs |
Implements alize::FeatureInputStream.
| virtual void alize::FeatureInputStreamModifier::reset | ( | ) | [virtual] |
Resets the input stream
Implements alize::FeatureInputStream.
| virtual void alize::FeatureInputStreamModifier::seekFeature | ( | unsigned long | pos, |
| const String & | srcName | ||
| ) | [virtual] |
Sets the position indicator associated with the stream to a new position. Does not throw any exception or error.
| pos | new position of the indicator |
| srcName | source name to seek in a particular source |
Implements alize::FeatureInputStream.
| void alize::FeatureInputStreamModifier::setMask | ( | const String & | m ) |
Defines the mask to select acoustic parameters
Examples :
"0" : select parameter #0
"1-35" : select parameters #1 to #35
"0,1-3,6,7" : select parameters #0 and #1 to #3 and #6 and #7
Characters allowed : "0" to "9", "," and "-".
To remove the mask, set m to "NO_MASK"
| Exception | if the mask is invalid |
| virtual String alize::FeatureInputStreamModifier::toString | ( | ) | const [virtual] |
This method is frequently overridden in the derived classes. If it is not, it returns the name of the class of the object and the address of the object
Reimplemented from alize::Object.
| void alize::FeatureInputStreamModifier::updateMask | ( | const String & | begin, |
| const String & | end | ||
| ) | [private] |
| virtual bool alize::FeatureInputStreamModifier::writeFeature | ( | const Feature & | f, |
| unsigned long | s = 1 |
||
| ) | [virtual] |
Writes a feature in the stream and move the pointer s step forward
| f | the feature to store the data read |
| s | step (default value = 1) |
| IOException | if an I/O error occurs |
Reimplemented from alize::FeatureInputStream.
friend class TestFeatureInputStreamModifier [friend] |
Definition at line 91 of file FeatureInputStreamModifier.h.
Definition at line 200 of file FeatureInputStreamModifier.h.
Definition at line 201 of file FeatureInputStreamModifier.h.
bool alize::FeatureInputStreamModifier::_ownStream [private] |
Definition at line 206 of file FeatureInputStreamModifier.h.
Definition at line 199 of file FeatureInputStreamModifier.h.
Definition at line 203 of file FeatureInputStreamModifier.h.
unsigned long alize::FeatureInputStreamModifier::_selectionSize [private] |
Definition at line 204 of file FeatureInputStreamModifier.h.
Definition at line 202 of file FeatureInputStreamModifier.h.
bool alize::FeatureInputStreamModifier::_useMask [private] |
Definition at line 205 of file FeatureInputStreamModifier.h.
1.7.2