Maze Builder Docs 6.7.5
Loading...
Searching...
No Matches
mazes::colored_grid Class Reference
Inheritance diagram for mazes::colored_grid:
[legend]
Collaboration diagram for mazes::colored_grid:
[legend]

Public Member Functions

 colored_grid (const colored_grid &)=delete
 
colored_gridoperator= (const colored_grid &)=delete
 
 colored_grid (colored_grid &&) noexcept=default
 
colored_gridoperator= (colored_grid &&) noexcept=default
 
 colored_grid (unsigned int width=1u, unsigned int length=1u, unsigned int levels=1u)
 Constructs a colored grid with specified dimensions.
 
virtual std::string contents_of (const std::shared_ptr< cell > &c) const noexcept override
 Retrieves the contents of a given cell, if available.
 
virtual std::uint32_t background_color_for (const std::shared_ptr< cell > &c) const noexcept override
 Retrieves the background color for a given cell, if available.
 
grid_operationsoperations () noexcept override
 Get access to grid operations interface.
 
const grid_operationsoperations () const noexcept override
 Get access to const grid operations interface.
 
- Public Member Functions inherited from mazes::grid_interface

Constructor & Destructor Documentation

◆ colored_grid()

mazes::colored_grid::colored_grid ( unsigned int width = 1u,
unsigned int length = 1u,
unsigned int levels = 1u )
explicit

Constructs a colored grid with specified dimensions.

Parameters
widthThe width of the grid. Defaults to 1.
lengthThe length of the grid. Defaults to 1.
levelsThe number of levels in the grid. Defaults to 1.

Member Function Documentation

◆ background_color_for()

virtual std::uint32_t mazes::colored_grid::background_color_for ( const std::shared_ptr< cell > & c) const
overridevirtualnoexcept

Retrieves the background color for a given cell, if available.

Parameters
cA shared pointer to the cell for which the background color is to be retrieved.
Returns
An 32-bit unsigned integer containing the background color

Implements mazes::grid_interface.

◆ contents_of()

virtual std::string mazes::colored_grid::contents_of ( const std::shared_ptr< cell > & c) const
overridevirtualnoexcept

Retrieves the contents of a given cell, if available.

Parameters
cA shared pointer to the cell whose contents are to be retrieved.
Returns
If the cell has no contents, the contents are considered empty

Implements mazes::grid_interface.

◆ operations() [1/2]

const grid_operations & mazes::colored_grid::operations ( ) const
overridevirtualnoexcept

Get access to const grid operations interface.

Returns
A const reference to the grid operations interface

Implements mazes::grid_interface.

◆ operations() [2/2]

grid_operations & mazes::colored_grid::operations ( )
overridevirtualnoexcept

Get access to grid operations interface.

Returns
A reference to the grid operations interface

Implements mazes::grid_interface.


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