blob: 24a4621862240c7c0d3275448912e273456524f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*=============================================================================*\
* File: gfsmCommon.h
* Author: Bryan Jurish <moocow@ling.uni-potsdam.de>
* Description: finite state machine library: common definitions
*
* Copyright (c) 2004-2008 Bryan Jurish.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*=============================================================================*/
/** \file gfsmCommon.h
* \brief Commonly use typedefs and constants
*/
#ifndef _GFSM_COMMON_H
#define _GFSM_COMMON_H
#include <gfsmConfig.h>
#include <glib.h>
/*======================================================================
* Defines
*/
#ifdef __GNUC__
# define GFSM_UNUSED __attribute__((unused))
#else
# define GFSM_UNUSED
#endif
/*======================================================================
* Basic Types
*/
/** Type for elementary arc-labels */
typedef guint16 gfsmLabelId;
/** Type for extended arc-labels (parameters and return values) */
typedef guint32 gfsmLabelVal;
/** Type for elementary state identifiers */
typedef guint32 gfsmStateId;
/** Alias for state identifiers */
typedef gfsmStateId gfsmNodeId;
/** Type for arc weights */
typedef gfloat gfsmWeight;
/*======================================================================
* Vector types
*/
/** Type for sequence of (gfsmLabelVal)s */
typedef GPtrArray gfsmLabelVector;
/** Type for a sequence of (gfsmStateId)s */
typedef GPtrArray gfsmStateIdVector;
/*======================================================================
* Constants
*/
/** Constant epsilon label */
extern const gfsmLabelId gfsmEpsilon;
/** Constant label for pseudo-epsilon moves in 1st argument to compose() */
extern const gfsmLabelId gfsmEpsilon1;
/** Constant label for pseudo-epsilon moves in 2nd argument to compose() */
extern const gfsmLabelId gfsmEpsilon2;
/** Constant indicating missing alphabet key */
extern const gpointer gfsmNoKey;
/** Constant indicating missing label */
extern const gfsmLabelId gfsmNoLabel;
/** Constant indicating missing state */
extern const gfsmStateId gfsmNoState;
/** Constant indicating missing weight
* \warning Deprecated: prefer gfsm_sr_one()
*/
extern const gfsmWeight gfsmNoWeight;
#endif /* _GFSM_COMMON_H */
|