Lines Matching refs:filename

35 inline bool IsFst(const string &filename) {  in IsFst()  argument
36 ifstream strm(filename.c_str()); in IsFst()
39 return IsFstHeader(strm, filename); in IsFst()
48 bool Read(const string &filename) { in Read() argument
50 if (filename.empty()) { in Read()
55 } else if (IsSTTable(filename)) { // Check if STTable in Read()
56 ReadSTTableHeader(filename, &fsthdr); in Read()
60 } else if (IsSTList(filename)) { // Check if STList in Read()
61 ReadSTListHeader(filename, &fsthdr); in Read()
65 } else if (IsFst(filename)) { // Check if Fst in Read()
66 ifstream istrm(filename.c_str()); in Read()
67 fsthdr.Read(istrm, filename); in Read()
94 static FarWriter *Create(const string &filename, FarType type = FAR_DEFAULT);
122 static FarReader *Open(const string &filename);
176 static STTableFarWriter *Create(const string &filename) { in Create() argument
178 STTableWriter<Fst<A>, FstWriter<A> >::Create(filename); in Create()
206 static STListFarWriter *Create(const string &filename) { in Create() argument
208 STListWriter<Fst<A>, FstWriter<A> >::Create(filename); in Create()
236 explicit FstFarWriter(const string &filename) in FstFarWriter() argument
237 : filename_(filename), error_(false), written_(false) {} in FstFarWriter()
239 static FstFarWriter *Create(const string &filename) { in Create() argument
240 return new FstFarWriter(filename); in Create()
269 FarWriter<A> *FarWriter<A>::Create(const string &filename, FarType type) { in Create() argument
272 if (filename.empty()) in Create()
273 return STListFarWriter<A>::Create(filename); in Create()
275 return STTableFarWriter<A>::Create(filename); in Create()
277 return STListFarWriter<A>::Create(filename); in Create()
279 return FstFarWriter<A>::Create(filename); in Create()
301 static STTableFarReader *Open(const string &filename) { in Open() argument
303 STTableReader<Fst<A>, FstReader<A> >::Open(filename); in Open()
349 static STListFarReader *Open(const string &filename) { in Open() argument
351 STListReader<Fst<A>, FstReader<A> >::Open(filename); in Open()
396 static FstFarReader *Open(const string &filename) { in Open() argument
398 filenames.push_back(filename); in Open()
501 FarReader<A> *FarReader<A>::Open(const string &filename) { in Open() argument
502 if (filename.empty()) in Open()
503 return STListFarReader<A>::Open(filename); in Open()
504 else if (IsSTTable(filename)) in Open()
505 return STTableFarReader<A>::Open(filename); in Open()
506 else if (IsSTList(filename)) in Open()
507 return STListFarReader<A>::Open(filename); in Open()
508 else if (IsFst(filename)) in Open()
509 return FstFarReader<A>::Open(filename); in Open()