FST  openfst-1.8.3
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
fst::MatcherFst< F, M, Name, Init, Data > Class Template Reference

#include <matcher-fst.h>

Inheritance diagram for fst::MatcherFst< F, M, Name, Init, Data >:
Inheritance graph
[legend]
Collaboration diagram for fst::MatcherFst< F, M, Name, Init, Data >:
Collaboration graph
[legend]

Public Types

using FST = F
 
using Arc = typename FST::Arc
 
using StateId = typename Arc::StateId
 
using FstMatcher = M
 
using MatcherData = typename FstMatcher::MatcherData
 
using Impl = internal::AddOnImpl< FST, Data >
 
using D = Data
 
- Public Types inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
using Arc = typename ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
using Arc = typename internal::AddOnImpl< F, Data >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >
using Arc = typename internal::AddOnImpl< F, Data >::Arc
 
using StateId = typename Arc::StateId
 
- Public Types inherited from fst::Fst< A >
using Arc = A
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 

Public Member Functions

 MatcherFst ()
 
 MatcherFst (const FST &fst, std::shared_ptr< Data > data=nullptr)
 
 MatcherFst (const Fst< Arc > &fst, std::shared_ptr< Data > data=nullptr)
 
 MatcherFst (const MatcherFst &fst, bool safe=false)
 
MatcherFstCopy (bool safe=false) const override
 
bool Write (std::ostream &strm, const FstWriteOptions &opts) const override
 
bool Write (const std::string &source) const override
 
void InitStateIterator (StateIteratorData< Arc > *data) const override
 
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const override
 
FstMatcherInitMatcher (MatchType match_type) const override
 
const FSTGetFst () const
 
const Data * GetAddOn () const
 
std::shared_ptr< Data > GetSharedAddOn () const
 
const MatcherDataGetData (MatchType match_type) const
 
std::shared_ptr< MatcherDataGetSharedData (MatchType match_type) const
 
- Public Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
StateId NumStates () const override
 
- Public Member Functions inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
StateId Start () const override
 
Weight Final (StateId s) const override
 
size_t NumArcs (StateId s) const override
 
size_t NumInputEpsilons (StateId s) const override
 
size_t NumOutputEpsilons (StateId s) const override
 
uint64_t Properties (uint64_t mask, bool test) const override
 
const std::string & Type () const override
 
const SymbolTableInputSymbols () const override
 
const SymbolTableOutputSymbols () const override
 
- Public Member Functions inherited from fst::ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >
std::optional< StateIdNumStatesIfKnown () const override
 
- Public Member Functions inherited from fst::Fst< A >
virtual ~Fst ()=default
 

Static Public Member Functions

static MatcherFstRead (std::istream &strm, const FstReadOptions &opts)
 
static MatcherFstRead (std::string_view source)
 
- Static Public Member Functions inherited from fst::ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >
static ExpandedFstRead (std::istream &strm, const FstReadOptions &opts)
 
static ExpandedFstRead (std::string_view source)
 
- Static Public Member Functions inherited from fst::Fst< A >
static FstRead (std::istream &strm, const FstReadOptions &opts)
 
static FstRead (const std::string &source)
 

Protected Member Functions

 MatcherFst (std::shared_ptr< Impl > impl)
 
- Protected Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
 ImplToExpandedFst (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
 ImplToExpandedFst (const ImplToExpandedFst &fst, bool safe)
 
- Protected Member Functions inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
 ImplToFst (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
 ImplToFst (const ImplToFst &fst, bool safe)
 
 ImplToFst ()=delete
 
 ImplToFst (const ImplToFst &fst)
 
 ImplToFst (ImplToFst &&fst) noexcept
 
ImplToFstoperator= (const ImplToFst &fst)
 
ImplToFstoperator= (ImplToFst &&fst) noexcept
 
const internal::AddOnImpl< F, Data > * GetImpl () const
 
internal::AddOnImpl< F, Data > * GetMutableImpl () const
 
std::shared_ptr< internal::AddOnImpl< F, Data > > GetSharedImpl () const
 
bool Unique () const
 
void SetImpl (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
- Protected Member Functions inherited from fst::Fst< A >
bool WriteFile (const std::string &source) const
 

Static Protected Member Functions

static std::shared_ptr< ImplCreateDataAndImpl (const FST &fst, std::string_view name)
 
static std::shared_ptr< ImplCreateDataAndImpl (const Fst< Arc > &fst, std::string_view name)
 
static std::shared_ptr< ImplCreateImpl (const FST &fst, std::string_view name, std::shared_ptr< Data > data)
 
static std::shared_ptr< ImplCreateImpl (const Fst< Arc > &fst, std::string_view name, std::shared_ptr< Data > data)
 
- Static Protected Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
static internal::AddOnImpl< F, Data > * Read (std::istream &strm, const FstReadOptions &opts)
 
static internal::AddOnImpl< F, Data > * Read (std::string_view source)
 

Friends

class StateIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
 
class ArcIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
 

Detailed Description

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
class fst::MatcherFst< F, M, Name, Init, Data >

Definition at line 94 of file matcher-fst.h.

Member Typedef Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::Arc = typename FST::Arc

Definition at line 97 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::D = Data

Definition at line 104 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::FST = F

Definition at line 96 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::FstMatcher = M

Definition at line 100 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::Impl = internal::AddOnImpl<FST, Data>

Definition at line 103 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::MatcherData = typename FstMatcher::MatcherData

Definition at line 101 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::StateId = typename Arc::StateId

Definition at line 98 of file matcher-fst.h.

Constructor & Destructor Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( )
inline

Definition at line 109 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const FST fst,
std::shared_ptr< Data >  data = nullptr 
)
inlineexplicit

Definition at line 114 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const Fst< Arc > &  fst,
std::shared_ptr< Data >  data = nullptr 
)
inlineexplicit

Definition at line 122 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const MatcherFst< F, M, Name, Init, Data > &  fst,
bool  safe = false 
)
inline

Definition at line 127 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( std::shared_ptr< Impl impl)
inlineexplicitprotected

Definition at line 227 of file matcher-fst.h.

Member Function Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
MatcherFst* fst::MatcherFst< F, M, Name, Init, Data >::Copy ( bool  safe = false) const
inlineoverridevirtual
template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateDataAndImpl ( const FST fst,
std::string_view  name 
)
inlinestaticprotected

Definition at line 191 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateDataAndImpl ( const Fst< Arc > &  fst,
std::string_view  name 
)
inlinestaticprotected

Definition at line 201 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateImpl ( const FST fst,
std::string_view  name,
std::shared_ptr< Data >  data 
)
inlinestaticprotected

Definition at line 208 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateImpl ( const Fst< Arc > &  fst,
std::string_view  name,
std::shared_ptr< Data >  data 
)
inlinestaticprotected

Definition at line 218 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const Data* fst::MatcherFst< F, M, Name, Init, Data >::GetAddOn ( ) const
inline

Definition at line 170 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const MatcherData* fst::MatcherFst< F, M, Name, Init, Data >::GetData ( MatchType  match_type) const
inline

Definition at line 176 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const FST& fst::MatcherFst< F, M, Name, Init, Data >::GetFst ( ) const
inline

Definition at line 168 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
std::shared_ptr<Data> fst::MatcherFst< F, M, Name, Init, Data >::GetSharedAddOn ( ) const
inline

Definition at line 172 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
std::shared_ptr<MatcherData> fst::MatcherFst< F, M, Name, Init, Data >::GetSharedData ( MatchType  match_type) const
inline

Definition at line 181 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
void fst::MatcherFst< F, M, Name, Init, Data >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
) const
inlineoverridevirtual

Implements fst::Fst< A >.

Definition at line 160 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
FstMatcher* fst::MatcherFst< F, M, Name, Init, Data >::InitMatcher ( MatchType  match_type) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 164 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
void fst::MatcherFst< F, M, Name, Init, Data >::InitStateIterator ( StateIteratorData< Arc > *  data) const
inlineoverridevirtual

Implements fst::Fst< A >.

Definition at line 156 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static MatcherFst* fst::MatcherFst< F, M, Name, Init, Data >::Read ( std::istream &  strm,
const FstReadOptions opts 
)
inlinestatic

Definition at line 136 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static MatcherFst* fst::MatcherFst< F, M, Name, Init, Data >::Read ( std::string_view  source)
inlinestatic

Definition at line 143 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
bool fst::MatcherFst< F, M, Name, Init, Data >::Write ( std::ostream &  strm,
const FstWriteOptions opts 
) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 148 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
bool fst::MatcherFst< F, M, Name, Init, Data >::Write ( const std::string &  source) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 152 of file matcher-fst.h.

Friends And Related Function Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
friend class ArcIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
friend

Definition at line 107 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
friend class StateIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
friend

Definition at line 106 of file matcher-fst.h.


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