FST  openfst-1.7.5
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
fst::SymbolTable Class Reference

#include <symbol-table.h>

Public Types

using SymbolType = internal::SymbolTableImpl::SymbolType
 
using iterator = SymbolTableIterator
 
using const_iterator = iterator
 

Public Member Functions

 SymbolTable (const std::string &name="<unspecified>")
 
virtual ~SymbolTable ()
 
virtual SymbolTableCopy () const
 
void AddTable (const SymbolTable &table)
 
int64 AddSymbol (SymbolType symbol, int64 key)
 
int64 AddSymbol (SymbolType symbol)
 
int64 AvailableKey () const
 
const std::string & CheckSum () const
 
int64 GetNthKey (ssize_t pos) const
 
std::string Find (int64 key) const
 
int64 Find (SymbolType symbol) const
 
const std::string & LabeledCheckSum () const
 
bool Member (int64 key) const
 
bool Member (SymbolType symbol) const
 
const std::string & Name () const
 
size_t NumSymbols () const
 
void RemoveSymbol (int64 key)
 
void SetName (const std::string &new_name)
 
bool Write (std::ostream &strm) const
 
bool Write (const std::string &source) const
 
bool WriteText (std::ostream &strm, const SymbolTableTextOptions &opts=SymbolTableTextOptions()) const
 
bool WriteText (const std::string &source) const
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 

Static Public Member Functions

static SymbolTableReadText (std::istream &strm, const std::string &name, const SymbolTableTextOptions &opts=SymbolTableTextOptions())
 
static SymbolTableReadText (const std::string &source, const SymbolTableTextOptions &opts=SymbolTableTextOptions())
 
static SymbolTableRead (std::istream &strm, const SymbolTableReadOptions &opts)
 
static SymbolTableRead (std::istream &strm, const std::string &source)
 
static SymbolTableRead (const std::string &source)
 

Protected Member Functions

 SymbolTable (std::shared_ptr< internal::SymbolTableImplBase > impl)
 
template<class T = internal::SymbolTableImplBase>
const T * Impl () const
 
template<class T = internal::SymbolTableImplBase>
T * MutableImpl ()
 

Detailed Description

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

Member Typedef Documentation

Definition at line 311 of file symbol-table.h.

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

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

Constructor & Destructor Documentation

fst::SymbolTable::SymbolTable ( const std::string &  name = "<unspecified>")
inlineexplicit

Definition at line 314 of file symbol-table.h.

virtual fst::SymbolTable::~SymbolTable ( )
inlinevirtual

Definition at line 317 of file symbol-table.h.

fst::SymbolTable::SymbolTable ( std::shared_ptr< internal::SymbolTableImplBase impl)
inlineexplicitprotected

Definition at line 449 of file symbol-table.h.

Member Function Documentation

int64 fst::SymbolTable::AddSymbol ( SymbolType  symbol,
int64  key 
)
inline

Definition at line 375 of file symbol-table.h.

int64 fst::SymbolTable::AddSymbol ( SymbolType  symbol)
inline

Definition at line 382 of file symbol-table.h.

void fst::SymbolTable::AddTable ( const SymbolTable table)
inline

Definition at line 368 of file symbol-table.h.

int64 fst::SymbolTable::AvailableKey ( ) const
inline

Definition at line 389 of file symbol-table.h.

SymbolTable::const_iterator fst::SymbolTable::begin ( ) const

Definition at line 399 of file symbol-table.cc.

SymbolTable::const_iterator fst::SymbolTable::cbegin ( ) const

Definition at line 407 of file symbol-table.cc.

SymbolTable::const_iterator fst::SymbolTable::cend ( ) const

Definition at line 409 of file symbol-table.cc.

const std::string& fst::SymbolTable::CheckSum ( ) const
inline

Definition at line 393 of file symbol-table.h.

virtual SymbolTable* fst::SymbolTable::Copy ( ) const
inlinevirtual

Definition at line 361 of file symbol-table.h.

SymbolTable::const_iterator fst::SymbolTable::end ( ) const

Definition at line 403 of file symbol-table.cc.

std::string fst::SymbolTable::Find ( int64  key) const
inline

Definition at line 399 of file symbol-table.h.

int64 fst::SymbolTable::Find ( SymbolType  symbol) const
inline

Definition at line 403 of file symbol-table.h.

int64 fst::SymbolTable::GetNthKey ( ssize_t  pos) const
inline

Definition at line 395 of file symbol-table.h.

template<class T = internal::SymbolTableImplBase>
const T* fst::SymbolTable::Impl ( ) const
inlineprotected

Definition at line 453 of file symbol-table.h.

const std::string& fst::SymbolTable::LabeledCheckSum ( ) const
inline

Definition at line 406 of file symbol-table.h.

bool fst::SymbolTable::Member ( int64  key) const
inline

Definition at line 410 of file symbol-table.h.

bool fst::SymbolTable::Member ( SymbolType  symbol) const
inline

Definition at line 412 of file symbol-table.h.

template<class T = internal::SymbolTableImplBase>
T* fst::SymbolTable::MutableImpl ( )
inlineprotected

Definition at line 458 of file symbol-table.h.

const std::string& fst::SymbolTable::Name ( ) const
inline

Definition at line 415 of file symbol-table.h.

size_t fst::SymbolTable::NumSymbols ( ) const
inline

Definition at line 419 of file symbol-table.h.

static SymbolTable* fst::SymbolTable::Read ( std::istream &  strm,
const SymbolTableReadOptions opts 
)
inlinestatic

Definition at line 336 of file symbol-table.h.

static SymbolTable* fst::SymbolTable::Read ( std::istream &  strm,
const std::string &  source 
)
inlinestatic

Definition at line 344 of file symbol-table.h.

static SymbolTable* fst::SymbolTable::Read ( const std::string &  source)
inlinestatic

Definition at line 351 of file symbol-table.h.

static SymbolTable* fst::SymbolTable::ReadText ( std::istream &  strm,
const std::string &  name,
const SymbolTableTextOptions opts = SymbolTableTextOptions() 
)
inlinestatic

Definition at line 321 of file symbol-table.h.

SymbolTable * fst::SymbolTable::ReadText ( const std::string &  source,
const SymbolTableTextOptions opts = SymbolTableTextOptions() 
)
static

Definition at line 334 of file symbol-table.cc.

void fst::SymbolTable::RemoveSymbol ( int64  key)
inline

Definition at line 421 of file symbol-table.h.

void fst::SymbolTable::SetName ( const std::string &  new_name)
inline

Definition at line 427 of file symbol-table.h.

bool fst::SymbolTable::Write ( std::ostream &  strm) const
inline

Definition at line 432 of file symbol-table.h.

bool fst::SymbolTable::Write ( const std::string &  source) const

Definition at line 344 of file symbol-table.cc.

bool fst::SymbolTable::WriteText ( std::ostream &  strm,
const SymbolTableTextOptions opts = SymbolTableTextOptions() 
) const

Definition at line 362 of file symbol-table.cc.

bool fst::SymbolTable::WriteText ( const std::string &  source) const

Definition at line 382 of file symbol-table.cc.


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