Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
parsing_state.h
Go to the documentation of this file.
1#ifndef PARSING_STATE_H
2#define PARSING_STATE_H
3
4#include <MazeBuilder/convert_contract.h>
7#include <MazeBuilder/state.h>
8
9#include <optional>
10#include <string_view>
11
14namespace mazes
15{
16 class args;
17 class runtime_stack;
18 struct context;
19
21 class parsing_state final : public convert, public state
22 {
23 public:
24 explicit parsing_state(const runtime_app::context& ctx, runtime_stack* rs);
25
29 [[nodiscard]] std::optional<args> convert(std::string_view arguments) const noexcept override;
30
31 void draw() const noexcept override;
32
37 [[nodiscard]] bool update(const std::optional<args>& args, double delta_time) noexcept override;
38
39 private:
40 grid_manager* grid_mapper;
41 processed_text_manager* processed_text_mapper;
42 };
43} // namespace mazes
44
45#endif // PARSING_STATE_H
Command-line argument handler with JSON support.
Definition args.h:19
Contract for converting arguments to args.
Definition convert_contract.h:13
State for parsing arguments.
Definition parsing_state.h:22
bool update(const std::optional< args > &args, double delta_time) noexcept override
Updates the state of the parsing process.
std::optional< args > convert(std::string_view arguments) const noexcept override
Converts a string of arguments into an args object.
Class representing the runtime stack of states in the maze builder application.
Definition runtime_stack.h:23
struct representing the context passed to states in the runtime_app stack
Definition runtime_app.h:34
struct representing a state in the runtime stack
Definition state.h:18