Maze Builder Docs 8.10.23
Loading...
Searching...
No Matches
mazes::grid_interface Class Referenceabstract

Interface for the grid class. More...

#include <grid_interface.h>

Inheritance diagram for mazes::grid_interface:
[legend]

Public Member Functions

virtual ~grid_interface ()=default
 Virtual destructor for the grid_interface class.
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 const grid_operations & operations () const noexcept=0
 Get access to const grid operations interface.

Detailed Description

Interface for the grid class.

The interface provides methods to interact with the grid

The interface has detailed information about a cell

Member Function Documentation

◆ background_color_for()

virtual std::uint32_t mazes::grid_interface::background_color_for ( std::shared_ptr< cell > const & c) const
nodiscardpure virtualnoexcept

Returns the background color for the specified cell, if available.

Parameters
cA shared pointer to the cell for which to determine the background color.
Returns
A 32-bit unsigned integer representing the background color of the cell

Implemented in mazes::colored_grid, mazes::distance_grid, and mazes::grid.

◆ contents_of()

virtual std::string mazes::grid_interface::contents_of ( std::shared_ptr< cell > const & c) const
nodiscardpure virtualnoexcept

Get detailed information of a cell in the grid in the form of a string.

Parameters
cA shared pointer to the cell for which to retrieve information.
Returns
A string containing detailed information about the specified cell.

Implemented in mazes::colored_grid, mazes::distance_grid, and mazes::grid.

◆ operations() [1/2]

virtual const grid_operations & mazes::grid_interface::operations ( ) const
nodiscardpure virtualnoexcept

Get access to const grid operations interface.

Returns
A const reference to the grid operations interface

Implemented in mazes::colored_grid, mazes::distance_grid, and mazes::grid.

◆ operations() [2/2]

virtual grid_operations & mazes::grid_interface::operations ( )
pure virtualnoexcept

Get access to grid operations interface.

Returns
A reference to the grid operations interface

Implemented in mazes::colored_grid, mazes::distance_grid, and mazes::grid.


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