FST  openfst-1.7.3
OpenFst Library
convert.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 <fst/script/convert.h>
5 
6 #include <fst/script/fst-class.h>
8 
9 namespace fst {
10 namespace script {
11 
12 FstClass *Convert(const FstClass &ifst, const std::string &new_type) {
13  ConvertInnerArgs iargs(ifst, new_type);
14  ConvertArgs args(iargs);
15  Apply<Operation<ConvertArgs>>("Convert", ifst.ArcType(), &args);
16  return args.retval;
17 }
18 
22 
23 } // namespace script
24 } // namespace fst
const std::string & ArcType() const final
Definition: fst-class.h:298
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
std::pair< const FstClass &, const std::string & > ConvertInnerArgs
Definition: convert.h:18
void Convert(ConvertArgs *args)
Definition: convert.h:23