gfsmCompound.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmCompound.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library: basic compound types
6  *
7  * Copyright (c) 2004-2011 Bryan Jurish.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *=============================================================================*/
23 
28 #ifndef _GFSM_COMPOUND_H
29 #define _GFSM_COMPOUND_H
30 
31 #include <gfsmEnum.h>
32 #include <gfsmWeightMap.h>
33 
34 /*======================================================================
35  * Compound Types
36  */
38 typedef guint32 gfsmLabelPair;
39 
41 typedef struct {
45 
47 
51 typedef guint8 gfsmComposeFilterState;
52 
54 
59 typedef struct {
64 
66 typedef struct {
70 
74 
78 
82 
83 
84 /*======================================================================
85  * LabelPair: Methods
86  */
88 
89 
92 gfsmLabelPair gfsm_labelpair_new(guint32 lo, guint32 hi);
93 
97 
101 
103 #define gfsm_labelpair_hash g_direct_hash
104 
106 #define gfsm_labelpair_equal g_direct_equal
107 
110 
112 gint gfsm_labelpair_compare_with_data(gfsmLabelPair lp1, gfsmLabelPair lp2, gpointer data);
114 
115 /*======================================================================
116  * Methods: gfsmStatePair
117  */
119 
120 
124 
128 
134 
137 
139 gint gfsm_statepair_compare(const gfsmStatePair *sp1, const gfsmStatePair *sp2);
140 
142 gboolean gfsm_statepair_equal(const gfsmStatePair *sp1, const gfsmStatePair *sp2);
143 
145 
146 /*======================================================================
147  * Methods: gfsmComposeState
148  */
150 
151 
155 
159 
165 
168 
171 
173 gboolean gfsm_compose_state_equal(const gfsmComposeState *sp1, const gfsmComposeState *sp2);
174 
176 
177 
178 /*======================================================================
179  * Methods: gfsmStateWeightPair
180  */
182 
183 
187 
191 
197 
200 
203 
205 gint gfsm_state_weight_pair_compare_q(const gfsmStateWeightPair *swp1, const gfsmStateWeightPair *swp2, gpointer data);
206 
208 gboolean gfsm_state_weight_pair_equal(const gfsmStateWeightPair *swp1, const gfsmStateWeightPair *swp2);
209 
211 
212 /*======================================================================
213  * Methods: gfsmStatePairEnum
214  */
216 
217 
223 
225 #define gfsm_statepair_enum_clear gfsm_enum_clear
226 
228 #define gfsm_statepair_enum_free gfsm_enum_free
229 
231 
232 /*======================================================================
233  * Methods: gfsmComposeStateEnum
234  */
236 
237 
243 
245 #define gfsm_compose_state_enum_clear gfsm_enum_clear
246 
248 #define gfsm_compose_state_enum_free gfsm_enum_free
249 
251 
252 
253 /*======================================================================
254  * Methods: gfsmStatePair2WeightHash
255  */
257 
258 
264 
266 
267 //-- inline definitions
268 #ifdef GFSM_INLINE_ENABLED
269 # include <gfsmCompound.hi>
270 #endif
271 
272 #endif /* _GFSM_COMPOUND_H */