Maze Builder Docs 8.10.23
Loading...
Searching...
No Matches
stringify_create_state.h
Go to the documentation of this file.
1#ifndef STRINGIFY_CREATE_STATE_H
2#define STRINGIFY_CREATE_STATE_H
3
6
7#include <string>
8#include <string_view>
9
12namespace mazes
13{
14 class args;
15 class randomizer;
16 class runtime_stack;
17
19 class stringify_create_state final : public create_contract, public write_to_output_state
20 {
21 public:
22 explicit stringify_create_state(const runtime_app::context &ctx, runtime_stack *rs);
23
24 std::any create(const args &a, randomizer &rng) noexcept override;
25
26 private:
28 std::string m_output;
29
30 protected:
32 [[nodiscard]] bool write_output(const std::string& output_target, const std::string& output_content) noexcept override;
33 };
34} // namespace mazes
35
36#endif // STRINGIFY_CREATE_STATE_H
Command-line argument handler with JSON support.
Definition args.h:19
Contract for the create function in the runtime.
Definition create_contract.h:21
Provides random-number generating capabilities.
Definition randomizer.h:16
Class representing the runtime stack of states in the maze builder application.
Definition runtime_stack.h:25
bool write_output(const std::string &output_target, const std::string &output_content) noexcept override
Write ASCII maze string to output target or stdout.
write_to_output_state(const runtime_app::context &ctx, runtime_stack *stack)
Construct a new write to output state.
struct representing the context passed to states in the runtime_app stack
Definition runtime_app.h:34