#include <FeatureServer.h>
List of all members.
Public Member Functions |
| | FeatureServer () |
| | FeatureServer (const Config &c) |
| | FeatureServer (const Config &c, FeatureInputStream &s) |
| | FeatureServer (const Config &c, const FileName &f) |
| | FeatureServer (const Config &c, const FileName &f, LabelServer &ls) |
| | FeatureServer (const Config &c, const XLine &l) |
| | FeatureServer (const Config &c, const XLine &l, LabelServer &ls) |
| void | init (const Config &c) |
| void | init (const Config &c, FeatureInputStream &s) |
| void | init (const Config &c, const FileName &f) |
| void | init (const Config &c, const FileName &f, LabelServer &ls) |
| void | init (const Config &c, const XLine &l) |
| void | init (const Config &c, const XLine &l, LabelServer &ls) |
| virtual | ~FeatureServer () |
| virtual unsigned long | getFeatureCount () |
| virtual unsigned long | getVectSize () |
| virtual const FeatureFlags & | getFeatureFlags () |
| virtual real_t | getSampleRate () |
| const String & | getServerName () const |
| void | setServerName (const String &s) |
| virtual bool | readFeature (Feature &f, unsigned long s=1) |
| virtual bool | writeFeature (const Feature &f, unsigned long s=1) |
| virtual void | seekFeature (unsigned long n, const String &s="") |
| 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 String | getClassName () const |
| virtual String | toString () const |
Private Member Functions |
| FeatureInputStream & | inputStream () |
| void | init () |
| HistoricUsage | defineHistoricUsage () const |
| unsigned long | defineHistoricSize () const |
| BufferUsage | defineBufferUsage () const |
| unsigned long | defineBufferSize () const |
| void | releaseAll () |
| | FeatureServer (const FeatureServer &s) |
| bool | operator== (const FeatureServer &) |
| bool | operator!= (const FeatureServer &) |
| const FeatureServer & | operator= (const FeatureServer &) |
Private Attributes |
| bool | _ownInputStream |
| FeatureInputStream * | _pInputStream |
| String | _serverName |
Friends |
| class | TestFeatureServer |
Detailed Description
This class represents a features server.
A featureServer is a circular buffer that can store features. Each feature can be accessed using an index or in a sequential way like a file. A feature server can read feature from a FeatureInputStream derived object. A feature server is itself derived from the FeatureInputStream class. It is possible to connect a feature server to an other one. When you create a feature server with a FeatureInputStream object, the server will read features from this object and store them until the object returns a NULL pointer. If the buffer size exceed the number of features loaded, the superfluous features are set to invalid. If you create a feature server without FeatureInputStream object connected, all the features are invalid.
- Author:
- Frederic Wils frederic.wils@lia.univ-avignon.fr
- Version:
- 1.0
- Date:
- 2003
Definition at line 94 of file FeatureServer.h.
Constructor & Destructor Documentation
| alize::FeatureServer::FeatureServer |
( |
) |
[explicit] |
| alize::FeatureServer::FeatureServer |
( |
const Config & |
c ) |
[explicit] |
Creates a FeatureServer object
- Parameters:
-
| c | configuration to build the server |
Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| s | a reference to a FeatureStream object that can provide features for the server. |
| alize::FeatureServer::FeatureServer |
( |
const Config & |
c, |
|
|
const FileName & |
f |
|
) |
| [explicit] |
Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| f | a feature file or a file (extension ".lst") that contains a list of feature files |
Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| f | a feature file or a file (extension ".lst") that contains a list of feature files |
| ls | a label server. |
| alize::FeatureServer::FeatureServer |
( |
const Config & |
c, |
|
|
const XLine & |
l |
|
) |
| [explicit] |
Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| l | a list of feature file names WITHOUT PATH AND EXTENSION The file type, extension and path come from the configuration (parameters "loadFeatureFileFormat" and "featureFilesPath") |
Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| l | a list of feature file names WITHOUT PATH AND EXTENSION The file type, extension and path come from the configuration (parameters "loadFeatureFileFormat" and "featureFilesPath") |
| ls | a label server. |
| virtual alize::FeatureServer::~FeatureServer |
( |
) |
[virtual] |
| alize::FeatureServer::FeatureServer |
( |
const FeatureServer & |
s ) |
[private] |
Member Function Documentation
| virtual void alize::FeatureServer::close |
( |
) |
[virtual] |
| unsigned long alize::FeatureServer::defineBufferSize |
( |
) |
const [private] |
| BufferUsage alize::FeatureServer::defineBufferUsage |
( |
) |
const [private] |
| unsigned long alize::FeatureServer::defineHistoricSize |
( |
) |
const [private] |
| HistoricUsage alize::FeatureServer::defineHistoricUsage |
( |
) |
const [private] |
| virtual String alize::FeatureServer::getClassName |
( |
) |
const [virtual] |
| virtual unsigned long alize::FeatureServer::getFeatureCount |
( |
) |
[virtual] |
Returns the number of features in the stream connected to the server.
- Returns:
- the number of features in the stream if possible
- Exceptions:
-
| Exception | if the stream cannot give it's features count |
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureServer::getFeatureCountOfASource |
( |
unsigned long |
srcIdx ) |
[virtual] |
Returns the feature count of a feature source
- Parameters:
-
| srcIdx | index of the source |
- Returns:
- the feature count of the source
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureServer::getFeatureCountOfASource |
( |
const String & |
src ) |
[virtual] |
Returns the feature count of a feature source
- Parameters:
-
- Returns:
- the feature count of the source
Implements alize::FeatureInputStream.
| virtual const FeatureFlags& alize::FeatureServer::getFeatureFlags |
( |
) |
[virtual] |
| virtual unsigned long alize::FeatureServer::getFirstFeatureIndexOfASource |
( |
unsigned long |
srcIdx ) |
[virtual] |
Returns the number of the first feature of a feature source. Useful for a multiple source stream.
- Parameters:
-
| srcIdx | index of the source |
- Returns:
- the number of the first feature
Implements alize::FeatureInputStream.
| virtual unsigned long alize::FeatureServer::getFirstFeatureIndexOfASource |
( |
const String & |
srcName ) |
[virtual] |
Returns the number of the first feature of a feature source. Useful for a multiple source stream.
- Parameters:
-
- Returns:
- the number of the first feature
Implements alize::FeatureInputStream.
| virtual const String& alize::FeatureServer::getNameOfASource |
( |
unsigned long |
srcIdx ) |
[virtual] |
Returns the a particular feature source. Useful for a multiple file stream.
- Parameters:
-
| srcIdx | index of the source |
- Returns:
- the name of the source
Implements alize::FeatureInputStream.
| virtual real_t alize::FeatureServer::getSampleRate |
( |
) |
[virtual] |
| const String& alize::FeatureServer::getServerName |
( |
) |
const |
| virtual unsigned long alize::FeatureServer::getSourceCount |
( |
) |
[virtual] |
| virtual unsigned long alize::FeatureServer::getVectSize |
( |
) |
[virtual] |
Re-initialize this server.
- Parameters:
-
| c | configuration to build the server |
| f | a feature file or a file (extension ".lst") that contains a list of feature files |
| ls | a label server. |
Re-initialize this server.
- Parameters:
-
| c | configuration to build the server |
| s | a reference to a FeatureStream object that can provide features for the server. |
| void alize::FeatureServer::init |
( |
const Config & |
c, |
|
|
const XLine & |
l |
|
) |
| |
Re-initialize this server. Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| l | a list of feature file names WITHOUT PATH AND EXTENSION The file type, extension and path come from the configuration (parameters "loadFeatureFileFormat" and "featureFilesPath") |
| void alize::FeatureServer::init |
( |
const Config & |
c ) |
|
Re-initialize this server.
- Parameters:
-
| c | configuration to build the server |
Re-initialize this server.
- Parameters:
-
| c | configuration to build the server |
| l | a list of feature file names WITHOUT PATH AND EXTENSION The file type, extension and path come from the configuration (parameters "loadFeatureFileFormat" and "featureFilesPath") |
| ls | a label server. |
| void alize::FeatureServer::init |
( |
) |
[private] |
| void alize::FeatureServer::init |
( |
const Config & |
c, |
|
|
const FileName & |
f |
|
) |
| |
Re-initialize this server. Creates a FeatureServer object.
- Parameters:
-
| c | configuration to build the server |
| f | a feature file or a file (extension ".lst") that contains a list of feature files |
| bool alize::FeatureServer::operator!= |
( |
const FeatureServer & |
) |
[private] |
| bool alize::FeatureServer::operator== |
( |
const FeatureServer & |
) |
[private] |
| virtual bool alize::FeatureServer::readFeature |
( |
Feature & |
f, |
|
|
unsigned long |
s = 1 |
|
) |
| [virtual] |
Reads a feature
- Parameters:
-
| f | the feature to store the data read |
| s | after reading, the feature pointer is moved s steps forward. Can be 0 |
- Returns:
- false if end of stream met; true otherwise. In that case think to test feature validity before using
Implements alize::FeatureInputStream.
Referenced by alize::ViterbiAccum::computeAndAccumulate().
| void alize::FeatureServer::releaseAll |
( |
) |
[private] |
| virtual void alize::FeatureServer::reset |
( |
) |
[virtual] |
| virtual void alize::FeatureServer::seekFeature |
( |
unsigned long |
n, |
|
|
const String & |
s = "" |
|
) |
| [virtual] |
| void alize::FeatureServer::setServerName |
( |
const String & |
s ) |
|
| virtual String alize::FeatureServer::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
- Returns:
- a description of the object
Reimplemented from alize::Object.
| virtual bool alize::FeatureServer::writeFeature |
( |
const Feature & |
f, |
|
|
unsigned long |
s = 1 |
|
) |
| [virtual] |
Writes a feature
- Parameters:
-
| f | the feature |
| s | after writing, the feature pointer is moved s steps forward. Can be 0 |
Reimplemented from alize::FeatureInputStream.
Friends And Related Function Documentation
friend class TestFeatureServer [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: