Home | History | Annotate | Download | only in lib

Lines Matching refs:opts

149   static Fst<A> *Read(istream &strm, const FstReadOptions &opts) {
150 FstReadOptions ropts(opts);
153 hdr = *opts.header;
155 if (!hdr.Read(strm, opts.source))
182 virtual bool Write(ostream &strm, const FstWriteOptions &opts) const {
456 // If opts.header is non-null, skip read-in and use the option value.
457 // If opts.[io]symbols is non-null, read-in but use the option value.
458 bool ReadHeaderAndSymbols(istream &strm, const FstReadOptions& opts,
460 if (opts.header)
461 *hdr = *opts.header;
462 else if (!hdr->Read(strm, opts.source))
466 << type_ << "\": " << opts.source;
472 << "\": " << opts.source;
477 << type_ << " Fst version: " << opts.source;
482 isymbols_ = SymbolTable::Read(strm, opts.source);
484 osymbols_ =SymbolTable::Read(strm, opts.source);
486 if (opts.isymbols) {
488 isymbols_ = opts.isymbols->Copy();
490 if (opts.osymbols) {
492 osymbols_ = opts.osymbols->Copy();
498 // If a opts.header is false, skip writing header.
499 // If opts.[io]symbols is false, skip writing those symbols.
500 void WriteHeaderAndSymbols(ostream &strm, const FstWriteOptions& opts,
502 if (opts.write_header) {
508 if (isymbols_ && opts.write_isymbols)
510 if (osymbols_ && opts.write_osymbols)
513 hdr->Write(strm, opts.source);
515 if (isymbols_ && opts.write_isymbols) isymbols_->Write(strm);
516 if (osymbols_ && opts.write_osymbols) osymbols_->Write(strm);