Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
mazes::state Struct Referenceabstract

struct representing a state in the runtime stack More...

#include <state.h>

Inheritance diagram for mazes::state:
[legend]

Public Types

enum class  ID : unsigned int {
  BTING = 0 , DFSING = 1 , EMPTY = 2 , LOADING = 3 ,
  PARSING = 4 , PIXELIZING = 5 , SIDEWINDERING = 6 , STRINGIFYING = 7 ,
  WAVEFRONT_OBJECTIFYING = 8 , TOTAL = 9
}
 

Public Member Functions

 state (const runtime_app::context &c, runtime_stack *rs)
 
virtual void draw () const noexcept=0
 
virtual bool update (const std::optional< args > &args, double delta_time) noexcept=0
 Update the state with the given arguments and elapsed time.
 

Protected Member Functions

void request_stack_push (ID state_id) const noexcept
 
void request_stack_pop () const noexcept
 
void request_stack_clear () const noexcept
 
const runtime_app::contextget_context () const noexcept
 
runtime_stackget_stack () const noexcept
 

Detailed Description

struct representing a state in the runtime stack

Member Function Documentation

◆ draw()

virtual void mazes::state::draw ( ) const
pure virtualnoexcept

Implemented in mazes::bt_maze_create_state.

◆ update()

virtual bool mazes::state::update ( const std::optional< args > & args,
double delta_time )
pure virtualnoexcept

Update the state with the given arguments and elapsed time.

Parameters
argsThe optional arguments to pass to the state's update function
delta_timeThe elapsed time since the last update
Returns
True if the state should continue updating, false otherwise

Implemented in mazes::bt_maze_create_state, mazes::dfs_maze_create_state, mazes::loading_state, mazes::parsing_state, mazes::pixels_create_state, mazes::stringify_create_state, mazes::sw_maze_create_state, and mazes::wavefront_object_create_state.


The documentation for this struct was generated from the following file: