Maze Builder Docs
8.10.23
Loading...
Searching...
No Matches
wavefront_object_create_state.h
Go to the documentation of this file.
1
#ifndef WAVEFRONT_OBJECT_CREATE_STATE_H
2
#define WAVEFRONT_OBJECT_CREATE_STATE_H
3
4
#include <
MazeBuilder/create_contract.h
>
5
#include <
MazeBuilder/write_to_output_state.h
>
6
7
#include <string>
8
#include <string_view>
9
10
class
configurator;
11
class
randomizer;
12
class
runtime_stack;
13
16
namespace
mazes
17
{
19
class
wavefront_object_create_state final :
public
create_contract
,
public
write_to_output_state
20
{
21
public
:
22
explicit
wavefront_object_create_state(
const
runtime_app::context
& ctx,
runtime_stack
* rs);
23
28
std::any
create
(
const
args
&a,
randomizer
&rng)
noexcept
override
;
29
30
private
:
32
std::string m_output;
33
34
protected
:
36
[[nodiscard]]
bool
write_output
(
const
std::string& output_target,
const
std::string& output_content)
noexcept
override
;
37
};
38
}
// namespace mazes
39
40
#endif
// WAVEFRONT_OBJECT_CREATE_STATE_H
mazes::args
Command-line argument handler with JSON support.
Definition
args.h:19
mazes::create_contract
Contract for the create function in the runtime.
Definition
create_contract.h:21
mazes::randomizer
Provides random-number generating capabilities.
Definition
randomizer.h:16
mazes::runtime_stack
Class representing the runtime stack of states in the maze builder application.
Definition
runtime_stack.h:25
mazes::wavefront_object_create_state::create
std::any create(const args &a, randomizer &rng) noexcept override
Create a maze using the Wavefront Object algorithm.
mazes::wavefront_object_create_state::write_output
bool write_output(const std::string &output_target, const std::string &output_content) noexcept override
Write OBJ content to output file.
mazes::write_to_output_state::write_to_output_state
write_to_output_state(const runtime_app::context &ctx, runtime_stack *stack)
Construct a new write to output state.
create_contract.h
mazes::runtime_app::context
struct representing the context passed to states in the runtime_app stack
Definition
runtime_app.h:34
write_to_output_state.h
include
MazeBuilder
wavefront_object_create_state.h
Generated by
1.15.0