FST  openfst-1.7.1
OpenFst Library
synchronize.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/fst-class.h>
7 
8 namespace fst {
9 namespace script {
10 
11 void Synchronize(const FstClass &ifst, MutableFstClass *ofst) {
12  if (!internal::ArcTypesMatch(ifst, *ofst, "Synchronize")) {
13  ofst->SetProperties(kError, kError);
14  return;
15  }
16  SynchronizeArgs args(ifst, ofst);
17  Apply<Operation<SynchronizeArgs>>("Synchronize", ifst.ArcType(), &args);
18 }
19 
23 
24 } // namespace script
25 } // namespace fst
void Synchronize(SynchronizeArgs *args)
Definition: synchronize.h:18
std::pair< const FstClass &, MutableFstClass * > SynchronizeArgs
Definition: synchronize.h:15
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
bool ArcTypesMatch(const M &m, const N &n, const string &op_name)
Definition: script-impl.h:176
constexpr uint64 kError
Definition: properties.h:33
void SetProperties(uint64 props, uint64 mask)
Definition: fst-class.h:452