A grid that can calculate distances between cells.
More...
#include <distance_grid.h>
|
|
| distance_grid (unsigned int width=1u, unsigned int length=1u, unsigned int levels=1u) |
|
| distance_grid (const distance_grid &)=delete |
|
distance_grid & | operator= (const distance_grid &)=delete |
|
| distance_grid (distance_grid &&) noexcept=default |
|
distance_grid & | operator= (distance_grid &&) noexcept=default |
| std::string | contents_of (std::shared_ptr< cell > const &c) const noexcept override |
| std::uint32_t | background_color_for (std::shared_ptr< cell > const &c) const noexcept override |
| grid_operations & | operations () noexcept override |
| | Get access to grid operations interface.
|
| const grid_operations & | operations () const noexcept override |
| | Get access to const grid operations interface.
|
| void | resize (unsigned int rows, unsigned int cols, unsigned int levels) const noexcept |
| | Resize the grid.
|
| void | calculate_distances (int start_index, int end_index) noexcept |
| | Calculates distances for a range of indices.
|
| std::shared_ptr< distances > | get_distances () const noexcept |
| | Get the distances object.
|
|
virtual | ~grid_interface ()=default |
| | Virtual destructor for the grid_interface class.
|
A grid that can calculate distances between cells.
◆ background_color_for()
| std::uint32_t mazes::distance_grid::background_color_for |
( |
std::shared_ptr< cell > const & | c | ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ calculate_distances()
| void mazes::distance_grid::calculate_distances |
( |
int | start_index, |
|
|
int | end_index ) |
|
noexcept |
Calculates distances for a range of indices.
- Parameters
-
| start_index | The starting index of the range (inclusive). |
| end_index | The ending index of the range (exclusive). |
◆ contents_of()
| std::string mazes::distance_grid::contents_of |
( |
std::shared_ptr< cell > const & | c | ) |
const |
|
nodiscardoverridevirtualnoexcept |
◆ get_distances()
| std::shared_ptr< distances > mazes::distance_grid::get_distances |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the distances object.
- Returns
- A shared pointer to the distances object
◆ operations() [1/2]
|
|
nodiscardoverridevirtualnoexcept |
Get access to const grid operations interface.
- Returns
- A const reference to the grid operations interface
Implements mazes::grid_interface.
◆ operations() [2/2]
|
|
nodiscardoverridevirtualnoexcept |
Get access to grid operations interface.
- Returns
- A reference to the grid operations interface
Implements mazes::grid_interface.
◆ resize()
| void mazes::distance_grid::resize |
( |
unsigned int | rows, |
|
|
unsigned int | cols, |
|
|
unsigned int | levels ) const |
|
noexcept |
Resize the grid.
- Parameters
-
The documentation for this class was generated from the following file: