TableMatcher< F, BackoffMatcher > Class Template Reference

#include <table-matcher.h>

Inheritance diagram for TableMatcher< F, BackoffMatcher >:
Collaboration diagram for TableMatcher< F, BackoffMatcher >:

Public Types

typedef F FST
 
typedef F::Arc Arc
 
typedef Arc::Label Label
 
typedef Arc::StateId StateId
 
typedef StateId ArcId
 
typedef Arc::Weight Weight
 
typedef TableMatcherImpl< F, BackoffMatcher > Impl
 

Public Member Functions

 TableMatcher (const FST &fst, MatchType match_type, const TableMatcherOptions &opts=TableMatcherOptions())
 
 TableMatcher (const TableMatcher< FST, BackoffMatcher > &matcher, bool safe=false)
 
virtual const FSTGetFst () const
 
virtual MatchType Type (bool test) const
 
void SetState (StateId s)
 
bool Find (Label match_label)
 
const ArcValue () const
 
void Next ()
 
bool Done () const
 
const ArcValue ()
 
virtual TableMatcher< FST, BackoffMatcher > * Copy (bool safe=false) const
 
virtual uint64 Properties (uint64 props) const
 

Private Member Functions

virtual void SetState_ (StateId s)
 
virtual bool Find_ (Label label)
 
virtual bool Done_ () const
 
virtual const ArcValue_ () const
 
virtual void Next_ ()
 
TableMatcheroperator= (const TableMatcher &)=delete
 

Private Attributes

std::shared_ptr< Implimpl_
 

Detailed Description

template<class F, class BackoffMatcher = SortedMatcher<F>>
class fst::TableMatcher< F, BackoffMatcher >

Definition at line 243 of file table-matcher.h.

Member Typedef Documentation

◆ Arc

typedef F::Arc Arc

Definition at line 246 of file table-matcher.h.

◆ ArcId

typedef StateId ArcId

Definition at line 249 of file table-matcher.h.

◆ FST

typedef F FST

Definition at line 245 of file table-matcher.h.

◆ Impl

typedef TableMatcherImpl<F, BackoffMatcher> Impl

Definition at line 252 of file table-matcher.h.

◆ Label

typedef Arc::Label Label

Definition at line 247 of file table-matcher.h.

◆ StateId

typedef Arc::StateId StateId

Definition at line 248 of file table-matcher.h.

◆ Weight

typedef Arc::Weight Weight

Definition at line 251 of file table-matcher.h.

Constructor & Destructor Documentation

◆ TableMatcher() [1/2]

TableMatcher ( const FST fst,
MatchType  match_type,
const TableMatcherOptions opts = TableMatcherOptions() 
)
inline

Definition at line 254 of file table-matcher.h.

256  : impl_(std::make_shared<Impl>(fst, match_type, opts)) { }
Definition: graph.dox:21
std::shared_ptr< Impl > impl_

◆ TableMatcher() [2/2]

TableMatcher ( const TableMatcher< FST, BackoffMatcher > &  matcher,
bool  safe = false 
)
inline

Definition at line 258 of file table-matcher.h.

260  : impl_(matcher.impl_) {
261  if (safe == true) {
262  LOG(FATAL) << "TableMatcher: Safe copy not supported";
263  }
264  }
std::shared_ptr< Impl > impl_

Member Function Documentation

◆ Copy()

virtual TableMatcher<FST, BackoffMatcher>* Copy ( bool  safe = false) const
inlinevirtual

Definition at line 282 of file table-matcher.h.

Referenced by fst::TableCompose().

282  {
283  return new TableMatcher<FST, BackoffMatcher> (*this, safe);
284  }

◆ Done()

bool Done ( ) const
inline

Definition at line 278 of file table-matcher.h.

278 { return impl_->Done(); }
std::shared_ptr< Impl > impl_

◆ Done_()

virtual bool Done_ ( ) const
inlineprivatevirtual

Definition at line 293 of file table-matcher.h.

293 { return impl_->Done(); }
std::shared_ptr< Impl > impl_

◆ Find()

bool Find ( Label  match_label)
inline

Definition at line 272 of file table-matcher.h.

272 { return impl_->Find(match_label); }
std::shared_ptr< Impl > impl_

◆ Find_()

virtual bool Find_ ( Label  label)
inlineprivatevirtual

Definition at line 292 of file table-matcher.h.

292 { return impl_->Find(label); }
std::shared_ptr< Impl > impl_

◆ GetFst()

virtual const FST& GetFst ( ) const
inlinevirtual

Definition at line 266 of file table-matcher.h.

266 { return impl_->GetFst(); }
std::shared_ptr< Impl > impl_

◆ Next()

void Next ( )
inline

Definition at line 276 of file table-matcher.h.

276 { return impl_->Next(); }
std::shared_ptr< Impl > impl_

◆ Next_()

virtual void Next_ ( )
inlineprivatevirtual

Definition at line 295 of file table-matcher.h.

295 { impl_->Next(); }
std::shared_ptr< Impl > impl_

◆ operator=()

TableMatcher& operator= ( const TableMatcher< F, BackoffMatcher > &  )
privatedelete

◆ Properties()

virtual uint64 Properties ( uint64  props) const
inlinevirtual

Definition at line 286 of file table-matcher.h.

286 { return impl_->Properties(props); } // simple matcher that does
std::shared_ptr< Impl > impl_

◆ SetState()

void SetState ( StateId  s)
inline

Definition at line 270 of file table-matcher.h.

270 { return impl_->SetState(s); }
std::shared_ptr< Impl > impl_

◆ SetState_()

virtual void SetState_ ( StateId  s)
inlineprivatevirtual

Definition at line 291 of file table-matcher.h.

291 { impl_->SetState(s); }
std::shared_ptr< Impl > impl_

◆ Type()

virtual MatchType Type ( bool  test) const
inlinevirtual

Definition at line 268 of file table-matcher.h.

268 { return impl_->Type(test); }
std::shared_ptr< Impl > impl_

◆ Value() [1/2]

const Arc& Value ( ) const
inline

Definition at line 274 of file table-matcher.h.

274 { return impl_->Value(); }
std::shared_ptr< Impl > impl_

◆ Value() [2/2]

const Arc& Value ( )
inline

Definition at line 280 of file table-matcher.h.

280 { return impl_->Value(); }
std::shared_ptr< Impl > impl_

◆ Value_()

virtual const Arc& Value_ ( ) const
inlineprivatevirtual

Definition at line 294 of file table-matcher.h.

294 { return impl_->Value(); }
std::shared_ptr< Impl > impl_

Member Data Documentation

◆ impl_

std::shared_ptr<Impl> impl_
private

Definition at line 289 of file table-matcher.h.


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