Main Page
Related Pages
Data Structures
Files
File List
Globals
src
libgfsm
gfsmState.h
Go to the documentation of this file.
1
2
/*=============================================================================*\
3
* File: gfsmState.h
4
* Author: Bryan Jurish <moocow.bovine@gmail.com>
5
* Description: finite state machine library: states
6
*
7
* Copyright (c) 2004-2007 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_STATE_H
29
#define _GFSM_STATE_H
30
31
#include <
gfsmArcList.h
>
32
33
/*======================================================================
34
* Types
35
*/
36
38
typedef
struct
{
39
guint32 is_valid : 1;
40
guint32 is_final : 1;
41
guint32 is_temp : 1;
42
guint32 arc_list_temp : 1;
43
guint32 arc_data_temp : 1;
44
guint32 unused : 27;
45
gfsmArcList
*
arcs
;
46
}
gfsmState
;
47
48
49
/*======================================================================
50
* Methods: gfsmState: Constructors etc.
51
*/
53
54
55
GFSM_INLINE
56
gfsmState
*
gfsm_state_new_full
(gboolean is_final,
gfsmArcList
*arcs);
57
59
GFSM_INLINE
60
gfsmState
*
gfsm_state_new
(
void
);
61
63
GFSM_INLINE
64
gfsmState
*
gfsm_state_copy
(
gfsmState
*dst,
const
gfsmState
*src);
65
67
GFSM_INLINE
68
void
gfsm_state_clear
(
gfsmState
*s);
69
71
GFSM_INLINE
72
void
gfsm_state_free
(
gfsmState
*s, gboolean free_arcs);
73
75
GFSM_INLINE
76
void
gfsm_state_close
(
gfsmState
*s);
77
79
80
/*======================================================================
81
* Methods: gfsmState: Accessors
82
*/
84
85
87
GFSM_INLINE
88
gboolean
gfsm_state_is_ok
(
const
gfsmState
*s);
89
91
GFSM_INLINE
92
gboolean
gfsm_state_is_final
(
const
gfsmState
*s);
93
95
GFSM_INLINE
96
void
gfsm_state_set_final
(
gfsmState
*s, gboolean is_final);
97
99
GFSM_INLINE
100
guint
gfsm_state_out_degree
(
const
gfsmState
*s);
101
103
104
//-- inline definitions
105
#ifdef GFSM_INLINE_ENABLED
106
# include <gfsmState.hi>
107
#endif
108
109
#endif
/* _GFSM_STATE_H */
Generated on Tue Oct 21 2014 09:44:47 for libgfsm by
1.8.1.2