-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.h
More file actions
41 lines (35 loc) · 1.03 KB
/
Copy pathstate.h
File metadata and controls
41 lines (35 loc) · 1.03 KB
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
#ifndef STATE_H
#define STATE_H
#include "context.h"
/**
* @brief function of idle state
*
* @param self used for access to attributes of the state
* @param context use to switch context
*/
void StateIdle_Run(State *self, Context *context);
/**
* @brief function of loop state
*
* @param self used for access to attributes of the state
* @param context use to switch context
*/
void StateLoop_Run(State *self, Context *context);
/**
* @brief function of error state
*
* @param self used for access to attributes of the state
* @param context use to switch context
*/
void StateError_Run(State *self, Context *context);
/**
* @brief function of sub state
* The signature is the same as the other Run functions; internally,
* self is downcast from State* to SubState* to reach fields that only
* this state has and State does not, such as SubState's value field.
*
* @param self used for access to attributes of the state
* @param context use to switch context
*/
void SubState_Run(State *self, Context *context);
#endif