FST  openfst-1.8.2
OpenFst Library
Classes | Namespaces | Macros | Functions
util.h File Reference
#include <array>
#include <cstdint>
#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/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()
 

Functions

 DECLARE_bool (fst_error_fatal)
 
template<class T , typename std::enable_if_t< std::is_class_v< T >, T > * = nullptr>
std::istream & fst::ReadType (std::istream &strm, T *t)
 
template<class T >
std::istream & fst::ReadTypeN (std::istream &strm, size_t n, 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<typename T , class A , typename std::enable_if_t< std::is_class_v< T >, T > * = nullptr>
std::istream & fst::internal::ReadVectorType (std::istream &strm, std::vector< T, A > *c)
 
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 &&!std::is_convertible< T, std::string_view >::value, T >::type * = nullptr>
std::ostream & fst::WriteType (std::ostream &strm, const T t)
 
std::ostream & fst::WriteType (std::ostream &strm, std::string_view 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< int64_t > fst::ParseInt64 (std::string_view s, int base=10)
 
int64_t 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 >
std::string fst::WeightToStr (Weight w)
 
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 ( )
Value:
LOG(LEVEL(FST_FLAGS_fst_error_fatal ? base_logging::FATAL \
: base_logging::ERROR))
#define LOG(type)
Definition: log.h:49

Definition at line 53 of file util.h.

Function Documentation

DECLARE_bool ( fst_error_fatal  )