Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
grid_interface.h
Go to the documentation of this file.
1#ifndef GRID_INTERFACE_H
2#define GRID_INTERFACE_H
3
4#include <cstdint>
5#include <memory>
6#include <string>
7
10namespace mazes
11{
12 class grid_operations;
13 class cell;
14
20 {
21 public:
23 virtual ~grid_interface() = default;
24
28 [[nodiscard]] virtual std::string contents_of(std::shared_ptr<cell> const& c) const noexcept = 0;
29
33 [[nodiscard]] virtual std::uint32_t background_color_for(std::shared_ptr<cell> const& c) const noexcept = 0;
34
37 virtual grid_operations& operations() noexcept = 0;
38
41 [[nodiscard]] virtual const grid_operations& operations() const noexcept = 0;
42 }; // grid_interface
43} // namespace mazes
44
45#endif // GRID_INTERFACE_H
Interface for the grid class.
Definition grid_interface.h:20
virtual std::string contents_of(std::shared_ptr< cell > const &c) const noexcept=0
Get detailed information of a cell in the grid in the form of a string.
virtual std::uint32_t background_color_for(std::shared_ptr< cell > const &c) const noexcept=0
Returns the background color for the specified cell, if available.
virtual grid_operations & operations() noexcept=0
Get access to grid operations interface.
virtual ~grid_interface()=default
Virtual destructor for the grid_interface class.
Interface for grid navigation and manipulation operations.
Definition grid_operations.h:19