1 // fst-decl.h
2 
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Copyright 2005-2010 Google, Inc.
16 // Author: riley@google.com (Michael Riley)
17 //
18 // \file
19 // This file contains declarations of classes in the Fst template library.
20 //
21 
22 #ifndef FST_LIB_FST_DECL_H__
23 #define FST_LIB_FST_DECL_H__
24 
25 #include <fst/types.h>
26 
27 namespace fst {
28 
29 class SymbolTable;
30 class SymbolTableIterator;
31 
32 template <class W> class FloatWeightTpl;
33 template <class W> class TropicalWeightTpl;
34 template <class W> class LogWeightTpl;
35 template <class W> class MinMaxWeightTpl;
36 
37 typedef FloatWeightTpl<float> FloatWeight;
38 typedef TropicalWeightTpl<float> TropicalWeight;
39 typedef LogWeightTpl<float> LogWeight;
40 typedef MinMaxWeightTpl<float> MinMaxWeight;
41 
42 template <class W> class ArcTpl;
43 typedef ArcTpl<TropicalWeight> StdArc;
44 typedef ArcTpl<LogWeight> LogArc;
45 
46 template <class A, class C, class U = uint32> class CompactFst;
47 template <class A, class U = uint32> class ConstFst;
48 template <class A, class W, class M> class EditFst;
49 template <class A> class ExpandedFst;
50 template <class A> class Fst;
51 template <class A> class MutableFst;
52 template <class A> class VectorFst;
53 
54 template <class A, class C> class ArcSortFst;
55 template <class A> class ClosureFst;
56 template <class A> class ComposeFst;
57 template <class A> class ConcatFst;
58 template <class A> class DeterminizeFst;
59 template <class A> class DifferenceFst;
60 template <class A> class IntersectFst;
61 template <class A> class InvertFst;
62 template <class A, class B, class C> class ArcMapFst;
63 template <class A> class ProjectFst;
64 template <class A, class B, class S> class RandGenFst;
65 template <class A> class RelabelFst;
66 template <class A, class T> class ReplaceFst;
67 template <class A> class RmEpsilonFst;
68 template <class A> class UnionFst;
69 
70 template <class T, class Compare, bool max> class Heap;
71 
72 template <class A> class AcceptorCompactor;
73 template <class A> class StringCompactor;
74 template <class A> class UnweightedAcceptorCompactor;
75 template <class A> class UnweightedCompactor;
76 template <class A> class WeightedStringCompactor;
77 
78 template <class A, class P> class DefaultReplaceStateTable;
79 
80 typedef CompactFst<StdArc, AcceptorCompactor<StdArc> >
81 StdCompactAcceptorFst;
82 typedef CompactFst< StdArc, StringCompactor<StdArc> >
83 StdCompactStringFst;
84 typedef CompactFst<StdArc, UnweightedAcceptorCompactor<StdArc> >
85 StdCompactUnweightedAcceptorFst;
86 typedef CompactFst<StdArc, UnweightedCompactor<StdArc> >
87 StdCompactUnweightedFst;
88 typedef CompactFst< StdArc, WeightedStringCompactor<StdArc> >
89 StdCompactWeightedStringFst;
90 typedef ConstFst<StdArc> StdConstFst;
91 typedef ExpandedFst<StdArc> StdExpandedFst;
92 typedef Fst<StdArc> StdFst;
93 typedef MutableFst<StdArc> StdMutableFst;
94 typedef VectorFst<StdArc> StdVectorFst;
95 
96 
97 template <class C> class StdArcSortFst;
98 typedef ClosureFst<StdArc> StdClosureFst;
99 typedef ComposeFst<StdArc> StdComposeFst;
100 typedef ConcatFst<StdArc> StdConcatFst;
101 typedef DeterminizeFst<StdArc> StdDeterminizeFst;
102 typedef DifferenceFst<StdArc> StdDifferenceFst;
103 typedef IntersectFst<StdArc> StdIntersectFst;
104 typedef InvertFst<StdArc> StdInvertFst;
105 typedef ProjectFst<StdArc> StdProjectFst;
106 typedef RelabelFst<StdArc> StdRelabelFst;
107 typedef ReplaceFst<StdArc, DefaultReplaceStateTable<StdArc, ssize_t> >
108 StdReplaceFst;
109 typedef RmEpsilonFst<StdArc> StdRmEpsilonFst;
110 typedef UnionFst<StdArc> StdUnionFst;
111 
112 template <typename T> class IntegerFilterState;
113 typedef IntegerFilterState<signed char> CharFilterState;
114 typedef IntegerFilterState<short> ShortFilterState;
115 typedef IntegerFilterState<int> IntFilterState;
116 
117 template <class F> class Matcher;
118 template <class M1, class M2 = M1> class SequenceComposeFilter;
119 template <class M1, class M2 = M1> class AltSequenceComposeFilter;
120 template <class M1, class M2 = M1> class MatchComposeFilter;
121 
122 }  // namespace fst
123 
124 #endif  // FST_LIB_FST_DECL_H__
125