29#ifndef NOMLIB_SYSTEM_ISTATE_HPP
30#define NOMLIB_SYSTEM_ISTATE_HPP
32#include "nomlib/config.hpp"
46 typedef std::unique_ptr<IState> unique_ptr;
98 uint32
id (
void )
const;
Type
State type enumeration.
@ Parent
Top-level / top-most placement on the stack.
Type type_
The type of state.
virtual void on_init(void_ptr)
User-defined implementation of the state's initialization logic.
uint32 id(void) const
Obtain the user-defined identifier of the state.
uint32 id_
Unique identifier for the state.
virtual void on_draw(RenderWindow &)
uint32 timestamp(void) const
Obtain the recorded time stamp of the state.
virtual void on_resume(void_ptr)
User-defined implementation of the state's resume from pause state logic.
virtual bool on_event(const nom::Event &ev)
User-defined implementation of the state's event handling logic.
uint32 timestamp_
Number of ticks recorded at the time of state's construction.
uint32 flags_
Specialized state management.
IState(void)
Default constructor; initializes class variables to zero.
virtual void on_pause(void_ptr)
User-defined implementation of the state's paused state logic.
IState(uint32 id)
Constructor for user-defined initialization of the class variable fields.
Flags
Specialized control over state management.
uint32 flags(void) const
Obtain the user-defined flags of the state.
IState(uint32 id, uint32 flags, IState::Type type)
Constructor for user-defined initialization of the class variable fields.
IState::Type type(void) const
Get the type of state.
virtual void on_exit(void_ptr)
User-defined implementation of the state's destruction logic.
virtual ~IState(void)
Destructor; declared virtual for inheritance.
virtual void on_update(float)
User-defined implementation of the state's update logic.