Horizon Official Technical Documentation
|
|
GridHolder is a container for Grids, handles the visiting of grids. More...
#include <GridHolder.hpp>
Public Types | |
typedef Grid< ZONE_OBJECT_TYPES > | GridType |
Public Member Functions | |
GridHolder (int width, int height) | |
~GridHolder () | |
GridType & | get_grid (int x, int y) |
uint16_t | height () |
uint16_t | width () |
template<class VISITOR , class CONTAINER_TYPE > | |
void | visit_all (GridReferenceContainerVisitor< VISITOR, GridReferenceContainer< CONTAINER_TYPE > > &visitor) |
template<class VISITOR , class CONTAINER_TYPE > | |
void | visit (int x, int y, GridReferenceContainerVisitor< VISITOR, GridReferenceContainer< CONTAINER_TYPE > > &visitor) |
Private Attributes | |
int | _width { 0 } |
int | _height { 0 } |
GridType | _grids [MAX_GRIDS_PER_MAP][MAX_GRIDS_PER_MAP] |
GridHolder is a container for Grids, handles the visiting of grids.
ZONE_OBJECT_TYPES | TypeList of all the objects that can be stored in the grid. |
_bounds | The bounds of the GridHolder. |
_grids | The Grids contained in the GridHolder. |
typedef Grid<ZONE_OBJECT_TYPES> GridHolder< ZONE_OBJECT_TYPES >::GridType |
|
inline |
|
inline |
|
inline |
References GridHolder< ZONE_OBJECT_TYPES >::_grids, GridHolder< ZONE_OBJECT_TYPES >::_height, and GridHolder< ZONE_OBJECT_TYPES >::_width.
Referenced by Horizon::Zone::Map::ensure_grid_for_unit(), GridHolder< ZONE_OBJECT_TYPES >::visit(), and GridHolder< ZONE_OBJECT_TYPES >::visit_all().
|
inline |
References GridHolder< ZONE_OBJECT_TYPES >::_height.
|
inline |
References GridHolder< ZONE_OBJECT_TYPES >::get_grid().
|
inline |
References GridHolder< ZONE_OBJECT_TYPES >::_height, GridHolder< ZONE_OBJECT_TYPES >::_width, GridHolder< ZONE_OBJECT_TYPES >::get_grid(), and Grid< GRID_OBJECT_TYPES >::visit().
|
inline |
References GridHolder< ZONE_OBJECT_TYPES >::_width.
|
private |
Referenced by GridHolder< ZONE_OBJECT_TYPES >::get_grid().
|
private |
|
private |