Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
State.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_STATE_H
4 #define GRAIL_STATE_H
5 
6 #include <string>
7 
8 namespace grail
9 {
10 namespace fsm
11 {
15  class State
16  {
17  public:
18  State() = default;
19  State(const State& other) = default;
20  State(State&& other) = default;
21 
22  State& operator = (const State& other) = default;
23  State& operator = (State&& other) = default;
24 
25  virtual ~State() = default;
26 
31  virtual const std::string& GetName() const = 0;
32 
36  virtual void Enter();
37 
41  virtual void Update(float deltaTime);
42 
46  virtual void Exit();
47  };
48 }
49 }
50 
51 #endif
grail::fsm::State::GetName
virtual const std::string & GetName() const =0
GetName.
grail::fsm::State::Exit
virtual void Exit()
Exit - Called once after machine exits this state.
Definition: State.cpp:17
grail::fsm::State::Enter
virtual void Enter()
Enter - Called once after machine enters this state.
Definition: State.cpp:9
grail::fsm::State
The FiniteStateMachineState class - Class representing state of finite state machine.
Definition: State.hh:15
grail::fsm::State::Update
virtual void Update(float deltaTime)
Update - Called every cycle the machine is in this state (including the one during which machine ente...
Definition: State.cpp:13