FST  openfst-1.7.2
OpenFst Library
Classes | Namespaces | Macros | Functions
util.h File Reference
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <fst/compat.h>
#include <fst/types.h>
#include <fst/log.h>
#include <fstream>
#include <fst/flags.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fst::CompactSet< Key, NoKey >
 

Namespaces

 fst
 
 fst::internal
 

Macros

#define FSTERROR()   (FLAGS_fst_error_fatal ? LOG(FATAL) : LOG(ERROR))
 

Functions

 DECLARE_bool (fst_error_fatal)
 
template<class T , typename std::enable_if< std::is_class< T >::value, T >::type * = nullptr>
std::istream & fst::ReadType (std::istream &strm, T *t)
 
std::istream & fst::ReadType (std::istream &strm, string *s)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::vector< T... > *c)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::list< T... > *c)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::set< T... > *c)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::map< T... > *c)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::unordered_map< T... > *c)
 
template<class... T>
std::istream & fst::ReadType (std::istream &strm, std::unordered_set< T... > *c)
 
template<typename S , typename T >
std::istream & fst::ReadType (std::istream &strm, std::pair< S, T > *p)
 
template<typename S , typename T >
std::istream & fst::ReadType (std::istream &strm, std::pair< const S, T > *p)
 
template<class C , class ReserveFn >
std::istream & fst::internal::ReadContainerType (std::istream &strm, C *c, ReserveFn reserve)
 
template<class T , typename std::enable_if< std::is_class< T >::value, T >::type * = nullptr>
std::ostream & fst::WriteType (std::ostream &strm, const T t)
 
std::ostream & fst::WriteType (std::ostream &strm, const string &s)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::vector< T... > &c)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::list< T... > &c)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::set< T... > &c)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::map< T... > &c)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::unordered_map< T... > &c)
 
template<typename... T>
std::ostream & fst::WriteType (std::ostream &strm, const std::unordered_set< T... > &c)
 
template<typename S , typename T >
std::ostream & fst::WriteType (std::ostream &strm, const std::pair< S, T > &p)
 
template<class C >
std::ostream & fst::internal::WriteContainer (std::ostream &strm, const C &c)
 
int64 fst::StrToInt64 (const string &s, const string &src, size_t nline, bool allow_negative, bool *error=nullptr)
 
template<typename Weight >
Weight fst::StrToWeight (const string &s, const string &src, size_t nline)
 
template<typename Weight >
void fst::WeightToStr (Weight w, string *s)
 
void fst::SplitString (char *line, const char *delim, std::vector< char * > *vec, bool omit_empty_strings)
 
template<typename I >
bool fst::ReadIntPairs (const string &filename, std::vector< std::pair< I, I >> *pairs, bool allow_negative=false)
 
template<typename I >
bool fst::WriteIntPairs (const string &filename, const std::vector< std::pair< I, I >> &pairs)
 
template<typename Label >
bool fst::ReadLabelPairs (const string &filename, std::vector< std::pair< Label, Label >> *pairs, bool allow_negative=false)
 
template<typename Label >
bool fst::WriteLabelPairs (const string &filename, const std::vector< std::pair< Label, Label >> &pairs)
 
void fst::ConvertToLegalCSymbol (string *s)
 
bool fst::AlignInput (std::istream &strm)
 
bool fst::AlignOutput (std::ostream &strm)
 

Macro Definition Documentation

#define FSTERROR ( )    (FLAGS_fst_error_fatal ? LOG(FATAL) : LOG(ERROR))

Definition at line 35 of file util.h.

Function Documentation

DECLARE_bool ( fst_error_fatal  )