gfsmxlCascadeLookup.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmxlCascadeLookup.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library: lookup cascade: lookup routines
6  *
7  * Copyright (c) 2007-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 2.1 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 _GFSMXL_CASCADE_LOOKUP_H
29 #define _GFSMXL_CASCADE_LOOKUP_H
30 
31 #include <gfsmxlCascade.h>
32 #include <gfsmxlCLCFib.h>
33 
34 /*======================================================================
35  * Types
36  */
37 
40 //typedef struct fibheap gfsmxlFibHeap;
41 
50 
55  guint32 ipos;
61 
66 
70 typedef GPtrArray gfsmxlPathArray;
71 
73 typedef struct {
74  //
75  //-- user data
78  guint max_paths;
79  guint max_ops;
80  //
81  //-- low-level data
83  GHashTable *configs;
86  guint n_ops;
89 
90 
91 /*======================================================================
92  * Constants
93  */
94 extern const gfsmxlCascadeLookupBacktrace gfsmxl_bt_null; /*< "empty" backtrace */
95 
96 /*======================================================================
97  * Constructors, etc.
98  */
100 
101 
104 gfsmxlCascadeLookup *gfsmxl_cascade_lookup_new_full(gfsmxlCascade *csc, gfsmWeight max_w, guint max_paths, guint max_ops);
105 
109 
116 
120 
122 
123 /*======================================================================
124  * gfsmxlCascadeLookup API
125  */
127 
128 
129 
138 
152 
154 
155 /*======================================================================
156  * gfsmxlCascadeLookup: Low-level and Debug Utilities
157  */
159 
160 
165 
171 
180 
186 
195  gfsmAutomaton *result);
196 
204  gfsmPath *p);
205 
209 
211 
212 /*======================================================================
213  * gfsmxlPathList: Low-level utilities
214  */
216 
219 gfsmxlPathArray *gfsmxl_patharray_new(guint n_paths);
220 
224 
227 
229 
230 /*======================================================================
231  * gfsmxlCascadeLookupConfig: Low-level Utilities
232  */
234 
235 
243 
248 
253 
263  guint32 ipos,
264  gfsmStateId oid,
265  gfsmStateId rid,
266  gfsmWeight w,
268  );
269 
273 
277 
283 
289 
292 
294 
295 /*======================================================================
296  * Low-level: gfsmxlCascadeLookupConfigList
297  */
299 
300 
303 
305 
306 
307 /*======================================================================
308  * END
309  */
310 
311 //-- inline definitions
312 #ifdef GFSM_INLINE_ENABLED
313 # include <gfsmxlCascadeLookup.hi>
314 #endif
315 
316 #endif /* _GFSMXL_CASCADE_LOOKUP_H */