18 #ifndef FST_SCRIPT_STATEITERATOR_CLASS_H_ 19 #define FST_SCRIPT_STATEITERATOR_CLASS_H_ 35 virtual bool Done()
const = 0;
36 virtual int64_t
Value()
const = 0;
37 virtual void Next() = 0;
38 virtual void Reset() = 0;
48 bool Done() const final {
return siter_.Done(); }
50 int64_t
Value() const final {
return siter_.Value(); }
52 void Next() final { siter_.Next(); }
54 void Reset() final { siter_.Reset(); }
65 std::pair<const FstClass &, StateIteratorClass *>;
76 bool Done()
const {
return impl_->Done(); }
78 int64_t
Value()
const {
return impl_->Value(); }
80 void Next() { impl_->Next(); }
82 void Reset() { impl_->Reset(); }
88 std::unique_ptr<StateIteratorImplBase> impl_;
93 const Fst<Arc> &
fst = *std::get<0>(*args).GetFst<Arc>();
94 std::get<1>(*args)->impl_ =
95 std::make_unique<StateIteratorClassImpl<Arc>>(fst);
101 #endif // FST_SCRIPT_STATEITERATOR_CLASS_H_
~StateIteratorClassImpl() override
StateIteratorClassImpl(const Fst< Arc > &fst)
virtual ~StateIteratorImplBase()
StateIteratorClass(const Fst< Arc > &fst)
std::pair< const FstClass &, StateIteratorClass * > InitStateIteratorClassArgs
int64_t Value() const final
virtual bool Done() const =0
void InitStateIteratorClass(InitStateIteratorClassArgs *args)
virtual int64_t Value() const =0