FST  openfst-1.8.1
OpenFst Library
Classes | Namespaces | Macros | Functions
util.h File Reference
#include <array>
#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/mapped-file.h>
#include <fst/flags.h>
#include <string_view>
#include <optional>
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()   (FST_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, std::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 , size_t N>
std::istream & fst::ReadType (std::istream &strm, std::array< T, N > *c)
 
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 std::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::WriteSequence (std::ostream &strm, const C &c)
 
template<class C >
std::ostream & fst::internal::WriteContainer (std::ostream &strm, const C &c)
 
template<class T , size_t N>
std::ostream & fst::WriteType (std::ostream &strm, const std::array< T, N > &c)
 
std::optional< int64fst::ParseInt64 (std::string_view s)
 
int64 fst::StrToInt64 (std::string_view s, std::string_view source, size_t nline, bool allow_negative, bool *error=nullptr)
 
template<typename Weight >
Weight fst::StrToWeight (std::string_view s)
 
template<typename Weight >
void fst::WeightToStr (Weight w, std::string *s)
 
std::vector< std::string_view > fst::SplitString (std::string_view line, std::string_view delim, bool omit_empty_strings)
 
template<typename I >
bool fst::ReadIntPairs (const std::string &source, std::vector< std::pair< I, I >> *pairs, bool allow_negative=false)
 
template<typename I >
bool fst::WriteIntPairs (const std::string &source, const std::vector< std::pair< I, I >> &pairs)
 
template<typename Label >
bool fst::ReadLabelPairs (const std::string &source, std::vector< std::pair< Label, Label >> *pairs, bool allow_negative=false)
 
template<typename Label >
bool fst::WriteLabelPairs (const std::string &source, const std::vector< std::pair< Label, Label >> &pairs)
 
void fst::ConvertToLegalCSymbol (std::string *s)
 
bool fst::AlignInput (std::istream &strm, size_t align=MappedFile::kArchAlignment)
 
bool fst::AlignOutput (std::ostream &strm, size_t align=MappedFile::kArchAlignment)
 

Macro Definition Documentation

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

Definition at line 53 of file util.h.

Function Documentation

DECLARE_bool ( fst_error_fatal  )