Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef FST_SCRIPT_COMPOSE_H_
00018 #define FST_SCRIPT_COMPOSE_H_
00019
00020 #include <fst/script/arg-packs.h>
00021 #include <fst/script/fst-class.h>
00022 #include <fst/compose.h>
00023
00024 namespace fst {
00025 namespace script {
00026
00027 typedef args::Package<const FstClass&, const FstClass&,
00028 MutableFstClass*, ComposeFilter> ComposeArgs1;
00029
00030 template<class Arc>
00031 void Compose(ComposeArgs1 *args) {
00032 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
00033 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
00034 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
00035
00036 Compose(ifst1, ifst2, ofst, args->arg4);
00037 }
00038
00039 typedef fst::ComposeOptions ComposeOptions;
00040
00041 typedef args::Package<const FstClass&, const FstClass&,
00042 MutableFstClass*, const ComposeOptions &> ComposeArgs2;
00043
00044 template<class Arc>
00045 void Compose(ComposeArgs2 *args) {
00046 const Fst<Arc> &ifst1 = *(args->arg1.GetFst<Arc>());
00047 const Fst<Arc> &ifst2 = *(args->arg2.GetFst<Arc>());
00048 MutableFst<Arc> *ofst = args->arg3->GetMutableFst<Arc>();
00049
00050 Compose(ifst1, ifst2, ofst, args->arg4);
00051 }
00052
00053 void Compose(const FstClass &ifst1, const FstClass &ifst2,
00054 MutableFstClass *ofst,
00055 const ComposeOptions &opts = fst::script::ComposeOptions());
00056
00057 void Compose(const FstClass &ifst1, const FstClass &ifst2,
00058 MutableFstClass *ofst, ComposeFilter compose_filter);
00059
00060 }
00061 }
00062
00063 #endif /// FST_SCRIPT_COMPOSE_H_
00064