Public Types | Public Member Functions | Static Public Member Functions

fst::AddOnImpl< F, T > Class Template Reference

#include <fst/add-on.h>

Inherits FstImpl< F::Arc >.

Collaboration diagram for fst::AddOnImpl< F, T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef F::Arc Arc
typedef Arc::Label Label
typedef Arc::Weight Weight
typedef Arc::StateId StateId

Public Member Functions

 AddOnImpl (const F &fst, const string &type, T *t=0)
 If 't' is non-zero, its reference count is incremented.
 AddOnImpl (const Fst< Arc > &fst, const string &type, T *t=0)
 If 't' is non-zero, its reference count is incremented.
 AddOnImpl (const AddOnImpl< F, T > &impl)
 ~AddOnImpl ()
StateId Start () const
Weight Final (StateId s) const
size_t NumArcs (StateId s) const
size_t NumInputEpsilons (StateId s) const
size_t NumOutputEpsilons (StateId s) const
size_t NumStates () const
bool Write (ostream &strm, const FstWriteOptions &opts) const
void InitStateIterator (StateIteratorData< Arc > *data) const
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const
F & GetFst ()
const F & GetFst () const
T * GetAddOn () const
void SetAddOn (T *t)
 If 't' is non-zero, its reference count is incremented.

Static Public Member Functions

static AddOnImpl< F, T > * Read (istream &strm, const FstReadOptions &opts)

Detailed Description

template<class F, class T>
class fst::AddOnImpl< F, T >

Add to an Fst F a type T object. T must have a 'T* Read(istream &)', a 'bool Write(ostream &)' method, and 'int RecCount(), 'int IncrRefCount()' and 'int DecrRefCount()' methods (e.g. 'MatcherData' in matcher-fst.h). The result is a new Fst implemenation with type name 'type'.

Definition at line 141 of file add-on.h.


Member Typedef Documentation

template<class F, class T>
typedef F::Arc fst::AddOnImpl< F, T >::Arc

Definition at line 143 of file add-on.h.

template<class F, class T>
typedef Arc::Label fst::AddOnImpl< F, T >::Label

Definition at line 144 of file add-on.h.

template<class F, class T>
typedef Arc::StateId fst::AddOnImpl< F, T >::StateId

Reimplemented from fst::FstImpl< F::Arc >.

Definition at line 146 of file add-on.h.

template<class F, class T>
typedef Arc::Weight fst::AddOnImpl< F, T >::Weight

Reimplemented from fst::FstImpl< F::Arc >.

Definition at line 145 of file add-on.h.


Constructor & Destructor Documentation

template<class F, class T>
fst::AddOnImpl< F, T >::AddOnImpl ( const F &  fst,
const string &  type,
T *  t = 0 
) [inline]

If 't' is non-zero, its reference count is incremented.

Definition at line 153 of file add-on.h.

template<class F, class T>
fst::AddOnImpl< F, T >::AddOnImpl ( const Fst< Arc > &  fst,
const string &  type,
T *  t = 0 
) [inline]

If 't' is non-zero, its reference count is incremented.

Definition at line 162 of file add-on.h.

template<class F, class T>
fst::AddOnImpl< F, T >::AddOnImpl ( const AddOnImpl< F, T > &  impl  )  [inline]

Definition at line 170 of file add-on.h.

template<class F, class T>
fst::AddOnImpl< F, T >::~AddOnImpl (  )  [inline]

Definition at line 178 of file add-on.h.


Member Function Documentation

template<class F, class T>
Weight fst::AddOnImpl< F, T >::Final ( StateId  s  )  const [inline]

Definition at line 184 of file add-on.h.

template<class F, class T>
T* fst::AddOnImpl< F, T >::GetAddOn (  )  const [inline]

Definition at line 267 of file add-on.h.

template<class F, class T>
F& fst::AddOnImpl< F, T >::GetFst (  )  [inline]

Definition at line 263 of file add-on.h.

template<class F, class T>
const F& fst::AddOnImpl< F, T >::GetFst (  )  const [inline]

Definition at line 265 of file add-on.h.

template<class F, class T>
void fst::AddOnImpl< F, T >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
) const [inline]

Definition at line 259 of file add-on.h.

template<class F, class T>
void fst::AddOnImpl< F, T >::InitStateIterator ( StateIteratorData< Arc > *  data  )  const [inline]

Definition at line 255 of file add-on.h.

template<class F, class T>
size_t fst::AddOnImpl< F, T >::NumArcs ( StateId  s  )  const [inline]

Definition at line 185 of file add-on.h.

template<class F, class T>
size_t fst::AddOnImpl< F, T >::NumInputEpsilons ( StateId  s  )  const [inline]

Definition at line 187 of file add-on.h.

template<class F, class T>
size_t fst::AddOnImpl< F, T >::NumOutputEpsilons ( StateId  s  )  const [inline]

Definition at line 191 of file add-on.h.

template<class F, class T>
size_t fst::AddOnImpl< F, T >::NumStates (  )  const [inline]

Definition at line 195 of file add-on.h.

template<class F, class T>
static AddOnImpl<F, T>* fst::AddOnImpl< F, T >::Read ( istream &  strm,
const FstReadOptions opts 
) [inline, static]

Definition at line 197 of file add-on.h.

template<class F, class T>
void fst::AddOnImpl< F, T >::SetAddOn ( T *  t  )  [inline]

If 't' is non-zero, its reference count is incremented.

Definition at line 270 of file add-on.h.

template<class F, class T>
StateId fst::AddOnImpl< F, T >::Start (  )  const [inline]

Definition at line 183 of file add-on.h.

template<class F, class T>
bool fst::AddOnImpl< F, T >::Write ( ostream &  strm,
const FstWriteOptions opts 
) const [inline]

Definition at line 237 of file add-on.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines