Lines Matching refs:ConstFst
38 template <class A, class U> class ConstFst;
109 friend class ConstFst<A, U>; // Allow finding narcs_, nstates_ during Write
221 LOG(ERROR) << "ConstFst::Read: Alignment failed: " << opts.source;
229 LOG(ERROR) << "ConstFst::Read: Read failed: " << opts.source;
236 LOG(ERROR) << "ConstFst::Read: Alignment failed: " << opts.source;
244 LOG(ERROR) << "ConstFst::Read: Read failed: " << opts.source;
258 class ConstFst : public ImplToExpandedFst< ConstFstImpl<A, U> > {
260 friend class StateIterator< ConstFst<A, U> >;
261 friend class ArcIterator< ConstFst<A, U> >;
269 ConstFst() : ImplToExpandedFst<Impl>(new Impl()) {}
271 explicit ConstFst(const Fst<A> &fst)
274 ConstFst(const ConstFst<A, U> &fst) : ImplToExpandedFst<Impl>(fst) {}
276 // Get a copy of this ConstFst. See Fst<>::Copy() for further doc.
277 virtual ConstFst<A, U> *Copy(bool safe = false) const {
278 return new ConstFst<A, U>(*this);
281 // Read a ConstFst from an input stream; return NULL on error
282 static ConstFst<A, U> *Read(istream &strm, const FstReadOptions &opts) {
284 return impl ? new ConstFst<A, U>(impl) : 0;
287 // Read a ConstFst from a file; return NULL on error
289 static ConstFst<A, U> *Read(const string &filename) {
291 return impl ? new ConstFst<A, U>(impl) : 0;
315 explicit ConstFst(Impl *impl) : ImplToExpandedFst<Impl>(impl) {}
325 static Impl* GetImplIfConstFst(const ConstFst &const_fst) {
329 // Note that this does not give privileged treatment to subtypes of ConstFst.
335 void operator=(const ConstFst<A, U> &fst); // disallow
343 bool ConstFst<A, U>::WriteFst(const F &fst, ostream &strm,
408 LOG(ERROR) << "ConstFst Write write failed: " << opts.source;
427 // Specialization for ConstFst; see generic version in fst.h
428 // for sample usage (but use the ConstFst type!). This version
431 class StateIterator< ConstFst<A, U> > {
435 explicit StateIterator(const ConstFst<A, U> &fst)
454 // Specialization for ConstFst; see generic version in fst.h
455 // for sample usage (but use the ConstFst type!). This version
458 class ArcIterator< ConstFst<A, U> > {
462 ArcIterator(const ConstFst<A, U> &fst, StateId s)
493 typedef ConstFst<StdArc> StdConstFst;