File management and Completed Part 1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#ifndef CONTEXT_H
|
||||
#define CONTEXT_H
|
||||
|
||||
#include <state.h>
|
||||
|
||||
class Context
|
||||
{
|
||||
public:
|
||||
Context(State& initialState);
|
||||
|
||||
void transition_to(State& newState);
|
||||
|
||||
void do_work();
|
||||
|
||||
void reset();
|
||||
void set_operational();
|
||||
void set_pre_operational();
|
||||
void fault();
|
||||
|
||||
const char* current_state_name() const;
|
||||
|
||||
private:
|
||||
State* state;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user