FST  openfst-1.7.1
OpenFst Library
stlist.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
4 #include <ios>
5 
7 #include <fstream>
8 
9 namespace fst {
10 
11 bool IsSTList(const string &filename) {
12  std::ifstream strm(filename, std::ios_base::in | std::ios_base::binary);
13  if (!strm) return false;
14  int32 magic_number = 0;
15  ReadType(strm, &magic_number);
16  return magic_number == kSTListMagicNumber;
17 }
18 
19 } // namespace fst
bool IsSTList(const string &filename)
Definition: stlist.cc:11
int32_t int32
Definition: types.h:26
std::istream & ReadType(std::istream &strm, T *t)
Definition: util.h:47