A state to use in a finite state machine.
More...
#include <State.hpp>
|
| State (State &&)=default |
| Move constructor.
|
|
State & | operator= (State &&)=default |
| Move assignment operator.
|
|
| State (const State &)=default |
| Copy constructor.
|
|
State & | operator= (const State &)=default |
| Copy assignment operator.
|
|
virtual | ~State ()=default |
| Virtual destructor.
|
|
virtual void | on_push ()=0 |
| Triggered when state is pushed onto the stack.
|
|
virtual void | on_pop ()=0 |
| Triggered when state is popped off the stack.
|
|
const std::string & | name () const noexcept |
| Get state name.
|
|
|
| State (const std::string &name) noexcept |
| Name constructor.
|
|
|
std::string | m_name |
| Name for debug purposes.
|
|
|
| State ()=delete |
| Constructor.
|
|
A state to use in a finite state machine.
Definition at line 18 of file State.hpp.
◆ State() [1/4]
galaxy::State::State |
( |
State && | | ) |
|
|
default |
◆ State() [2/4]
galaxy::State::State |
( |
const State & | | ) |
|
|
default |
◆ ~State()
virtual galaxy::State::~State |
( |
| ) |
|
|
virtualdefault |
◆ State() [3/4]
galaxy::State::State |
( |
const std::string & | name | ) |
|
|
protectednoexcept |
Name constructor.
- Parameters
-
name | Name of the scene for debug / editor purposes. |
Definition at line 12 of file State.cpp.
◆ State() [4/4]
◆ operator=() [1/2]
Move assignment operator.
◆ operator=() [2/2]
State & galaxy::State::operator= |
( |
const State & | | ) |
|
|
default |
Copy assignment operator.
◆ on_push()
virtual void galaxy::State::on_push |
( |
| ) |
|
|
pure virtual |
Triggered when state is pushed onto the stack.
Implemented in galaxy::Scene.
◆ on_pop()
virtual void galaxy::State::on_pop |
( |
| ) |
|
|
pure virtual |
Triggered when state is popped off the stack.
Implemented in galaxy::Scene.
◆ name()
const std::string & galaxy::State::name |
( |
| ) |
const |
|
nodiscardnoexcept |
Get state name.
- Returns
- Const string.
Definition at line 17 of file State.cpp.
◆ m_name
std::string galaxy::State::m_name |
|
protected |
Name for debug purposes.
Definition at line 76 of file State.hpp.
The documentation for this class was generated from the following files: