1#ifndef GRID_OPERATIONS_H
2#define GRID_OPERATIONS_H
25 virtual std::tuple<unsigned int, unsigned int, unsigned int>
get_dimensions() const noexcept = 0;
47 virtual
void sort(std::vector<std::shared_ptr<
cell>>& cells) const noexcept = 0;
50 virtual std::shared_ptr<
cell> get_north(const std::shared_ptr<
cell>& c) const noexcept = 0;
51 virtual std::shared_ptr<
cell> get_south(const std::shared_ptr<
cell>& c) const noexcept = 0;
52 virtual std::shared_ptr<
cell> get_east(const std::shared_ptr<
cell>& c) const noexcept = 0;
53 virtual std::shared_ptr<
cell> get_west(const std::shared_ptr<
cell>& c) const noexcept = 0;
58 virtual std::shared_ptr<
cell>
search(
int index) const noexcept = 0;
62 virtual std::vector<std::shared_ptr<
cell>>
get_cells() const noexcept = 0;
74 virtual
bool set_cells(const std::vector<std::shared_ptr<
cell>>& cells) noexcept = 0;
76 virtual
void set_str(std::
string const& str) noexcept = 0;
78 virtual std::
string get_str() const noexcept = 0;
Cell class with links to other cells.
Definition cell.h:17
Interface for grid navigation and manipulation operations.
Definition grid_operations.h:16
virtual bool set_cells(const std::vector< std::shared_ptr< cell > > &cells) noexcept=0
Set the cells in the grid.
virtual std::shared_ptr< cell > get_neighbor(std::shared_ptr< cell > const &c, Direction dir) const noexcept=0
Get neighbor by the cell's respective location.
virtual std::vector< std::shared_ptr< cell > > get_cells() const noexcept=0
Retrieves a collection of cell objects.
virtual int num_cells() const noexcept=0
Get the count of cells in the grid.
virtual std::vector< std::shared_ptr< cell > > get_neighbors(std::shared_ptr< cell > const &c) const noexcept=0
Get all the neighbors by the cell.
virtual std::tuple< unsigned int, unsigned int, unsigned int > get_dimensions() const noexcept=0
Retrieves the dimensions as a tuple of three unsigned integers.
virtual void clear_cells() noexcept=0
Cleanup cells by cleaning up links within cells.
virtual ~grid_operations()=default
Destroys the grid_operations object and releases any associated resources.
virtual void set_neighbor(const std::shared_ptr< cell > &c, Direction dir, std::shared_ptr< cell > const &neighbor) noexcept=0
Set neighbor for a cell in a given direction.
virtual void sort(std::vector< std::shared_ptr< cell > > &cells) const noexcept=0
Transformation and display cells.
virtual std::shared_ptr< cell > search(int index) const noexcept=0
Search for a cell by index.
Enumerations for the maze builder program.
Namespace for the maze builder.
Definition algo_interface.h:9
Direction
Directional neighbors for grid topology.
Definition enums.h:118