LAR Library: step.h Source File

LAR Library

step.h
Go to the documentation of this file.
1 #ifndef LARLIB_STEP_H
2 #define LARLIB_STEP_H
3 
102 #include <larlib/base.h>
103 
107 typedef struct step_t step_t;
108 
109 /*
110  * Forward declaration of a step action
111  */
112 typedef struct stepAction_t stepAction_t;
113 
126 typedef int (*stepFunction_t)(step_t *s, stepAction_t *a, void *c);
127 
131 struct stepAction_t {
132  int label;
134  void *param;
135 };
136 
169 step_t *stepCreate(stepAction_t *actions, int nactions);
170 
182 int stepRun(step_t *s, void *c);
183 
212 int stepGotoLabel(step_t *s, int label);
213 
218 void stepDestroy(step_t *s);
219 
220 /* @} */
221 
222 #endif
void stepDestroy(step_t *s)
Release the resources associated with a step-machine.
stepFunction_t fun
Function that executes this action.
Definition: step.h:133
int stepGotoLabel(step_t *s, int label)
Change the next action to be executed.
int(* stepFunction_t)(step_t *s, stepAction_t *a, void *c)
Type signature of the function associated with each action on the step machine.
Definition: step.h:126
Each action in the step machine.
Definition: step.h:131
int stepRun(step_t *s, void *c)
Execute the step machine.
struct step_t step_t
Opaque type of a handle to a step-machine.
Definition: step.h:107
int label
Label associated with this action.
Definition: step.h:132
Larlib basic definitions.
step_t * stepCreate(stepAction_t *actions, int nactions)
Create a new step machine.
void * param
Place-holder for parameter to fun.
Definition: step.h:134
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by   doxygen 1.8.9.1