All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
 

Public Member Functions

 TableMatcher (const FST &fst, MatchType match_type, const TableMatcherOptions &opts=TableMatcherOptions())
 
 TableMatcher (const TableMatcher< FST, BackoffMatcher > &matcher, bool safe)
 
virtual const FSTGetFst () const
 
virtual ~TableMatcher ()
 
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_ ()
 
 DISALLOW_COPY_AND_ASSIGN (TableMatcher)
 

Private Attributes

TableMatcherImpl< F,
BackoffMatcher > * 
impl_
 

Detailed Description

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

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

Member Typedef Documentation

typedef F::Arc Arc

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

typedef StateId ArcId

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

typedef F FST

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

typedef Arc::Label Label

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

typedef Arc::StateId StateId

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

typedef Arc::Weight Weight

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

Constructor & Destructor Documentation

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

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

268  :
269  impl_(new TableMatcherImpl<F, BackoffMatcher>(fst, match_type, opts)) { }
Definition: graph.dox:21
TableMatcherImpl< F, BackoffMatcher > * impl_
TableMatcher ( const TableMatcher< FST, BackoffMatcher > &  matcher,
bool  safe 
)
inline

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

272  :
273  impl_(matcher.impl_) {
274  impl_->IncrRefCount();
275  }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual ~TableMatcher ( )
inlinevirtual

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

279  {
280  if (!impl_->DecrRefCount()) delete impl_;
281  }
TableMatcherImpl< F, BackoffMatcher > * impl_

Member Function Documentation

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

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

Referenced by fst::TableCompose().

297  {
298  return new TableMatcher<FST, BackoffMatcher> (*this, safe);
299  }
DISALLOW_COPY_AND_ASSIGN ( TableMatcher< F, BackoffMatcher >  )
private
bool Done ( ) const
inline

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

293 { return impl_->Done(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual bool Done_ ( ) const
inlineprivatevirtual

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

308 { return impl_->Done(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
bool Find ( Label  match_label)
inline

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

287 { return impl_->Find(match_label); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual bool Find_ ( Label  label)
inlineprivatevirtual

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

307 { return impl_->Find(label); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual const FST& GetFst ( ) const
inlinevirtual

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

277 { return impl_->GetFst(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
void Next ( )
inline

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

291 { return impl_->Next(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual void Next_ ( )
inlineprivatevirtual

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

310 { impl_->Next(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual uint64 Properties ( uint64  props) const
inlinevirtual

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

301 { return impl_->Properties(props); } // simple matcher that does
TableMatcherImpl< F, BackoffMatcher > * impl_
void SetState ( StateId  s)
inline

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

285 { return impl_->SetState(s); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual void SetState_ ( StateId  s)
inlineprivatevirtual

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

306 { impl_->SetState(s); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual MatchType Type ( bool  test) const
inlinevirtual

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

283 { return impl_->Type(test); }
TableMatcherImpl< F, BackoffMatcher > * impl_
const Arc& Value ( ) const
inline

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

289 { return impl_->Value(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
const Arc& Value ( )
inline

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

295 { return impl_->Value(); }
TableMatcherImpl< F, BackoffMatcher > * impl_
virtual const Arc& Value_ ( ) const
inlineprivatevirtual

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

309 { return impl_->Value(); }
TableMatcherImpl< F, BackoffMatcher > * impl_

Member Data Documentation


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