34
34
extern "C" {
35
35
#endif
36
36
37
+ /**
38
+ @PARAM graph: the graph
39
+ @PARAM vertex: a vertex in the graph
40
+ @PARAM vertex_result: the vertex_results to copy
41
+ @PARAM color: next vertices color
42
+ @PARAM iloop: the count of the number of times the vertex has been called
43
+ Create a fireable structure
44
+ **/
37
45
struct fireable * create_fireable (struct graph * graph , struct vertex * vertex , struct vertex_result * args , enum STATES color , int iloop );
46
+
47
+ /**
48
+ @PARAM fireable: the fireable to destroy
49
+ Frees the fireable struct
50
+ **/
38
51
int destroy_fireable (struct fireable * fireable );
39
52
40
53
/**
@@ -57,9 +70,10 @@ struct graph *graph_init(int max_state_changes,
57
70
int max_loop ,
58
71
unsigned int lvl_verbose ,
59
72
enum CONTEXT context ,
60
- enum MEM_OPTION mem_option );
73
+ enum MEM_OPTION mem_option ,
74
+ enum REQUEST_FLAG request_flag );
61
75
#define MAX_LOOPS 100
62
- #define GRAPH_INIT () graph_init(-1, START_STOP, MAX_LOOPS, VERTICES | EDGES | FUNCTIONS | GLOBALS, SINGLE, CONTINUE)
76
+ #define GRAPH_INIT () graph_init(-1, START_STOP, MAX_LOOPS, VERTICES | EDGES | FUNCTIONS | GLOBALS, SINGLE, CONTINUE, IGNORE_FAIL_REQUEST )
63
77
64
78
/**
65
79
@PARAM graph: the graph
@@ -73,7 +87,7 @@ NOTE: NULL glbl will mean no global variables.
73
87
f cannot be NULL.
74
88
**/
75
89
struct vertex * create_vertex (struct graph * graph ,
76
- void (* f )(struct graph * , struct vertex_result * , void * , void * ),
90
+ void (* f )(int , struct graph * , struct vertex_result * , void * , void * ),
77
91
int id ,
78
92
void * glbl );
79
93
#define CREATE_VERTEX (graph , f , id ) create_vertex(graph, f, id, NULL, PROTECT_B_VARS)
@@ -91,7 +105,7 @@ NOTE: NULL glbl will mean no global variables. f cannot be NULL.
91
105
**/
92
106
struct edge * create_edge (struct vertex * a ,
93
107
struct vertex * b ,
94
- int (* f )(void * , void * , const void * const , const void * const ),
108
+ int (* f )(int , void * , void * , const void * const , const void * const ),
95
109
void * glbl );
96
110
#define CREATE_EDGE (a , b , f ) create_edge(a, b, f, NULL)
97
111
@@ -106,7 +120,7 @@ If edge_a_to_b or edge_b_to_a is NULL it will not.
106
120
**/
107
121
int create_bi_edge (struct vertex * a ,
108
122
struct vertex * b ,
109
- int (* f )(void * , void * , const void * const , const void * const ),
123
+ int (* f )(int , void * , void * , const void * const , const void * const ),
110
124
void * glbl ,
111
125
struct edge * * edge_a_to_b ,
112
126
struct edge * * edge_b_to_a );
@@ -174,7 +188,7 @@ NOTE: NULL f, or glbl will mean no change.
174
188
Modifies the vertices function
175
189
**/
176
190
int modify_vertex (struct vertex * vertex ,
177
- void (* f )(struct graph * , struct vertex_result * , void * , void * ),
191
+ void (* f )(int , struct graph * , struct vertex_result * , void * , void * ),
178
192
void * glbl );
179
193
#define MODIFY_VERTEX (vertex , f ) modify_vertex(vertex, f, NULL)
180
194
#define MODIFY_VERTEX_GLOBALS (vertex , glbl ) modify_vertex(vertex, NULL, glbl)
@@ -201,7 +215,7 @@ NOTE: NULL f, or glbl will mean no change.
201
215
**/
202
216
int modify_edge (struct vertex * a ,
203
217
struct vertex * b ,
204
- int (* f )(void * , void * , const void * const , const void * const ),
218
+ int (* f )(int , void * , void * , const void * const , const void * const ),
205
219
void * glbl );
206
220
207
221
#define MODIFY_EDGE (a , b , f ) modify_edge(a, b, f, NULL)
@@ -222,7 +236,7 @@ NOTE: NULL f, or glbl will mean no change.
222
236
**/
223
237
int modify_bi_edge (struct vertex * a ,
224
238
struct vertex * b ,
225
- int (* f )(void * , void * , const void * const , const void * const ),
239
+ int (* f )(int , void * , void * , const void * const , const void * const ),
226
240
void * glbl );
227
241
#define MODIFY_BI_EDGE (a , b , f ) modify_bi_edge(a, b, f, NULL)
228
242
#define MODIFY_BI_EDGE_GLOBALS (a , b , glbl ) modify_bi_edge(a, b, NULL, glbl)
0 commit comments