FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
A Zone is an abstract depiction of a CellCache or of a part of it. More...
#include <cellcache.h>
Public Member Functions | |
Zone (uint32_t id) | |
Constructor. More... | |
~Zone () | |
Destructor. More... | |
void | addCell (Cell *cell) |
Adds a cell to this zone. More... | |
void | removeCell (Cell *cell) |
Removes a cell from this zone. More... | |
void | mergeZone (Zone *zone) |
Merge two zones to one. More... | |
const std::set< Cell * > & | getCells () const |
Returns all cells of this zone. More... | |
void | resetCells () |
Remove all cells from zone but does not alter the cells. More... | |
uint32_t | getId () const |
Returns the zone identifier. More... | |
uint32_t | getCellCount () const |
Returns the number of cells. More... | |
std::vector< Cell * > | getTransitionCells (Layer *layer=NULL) |
Returns transistion cells of this zone. More... | |
Private Attributes | |
uint32_t | m_id |
identifier More... | |
std::set< Cell * > | m_cells |
cells in the zone More... | |
A Zone is an abstract depiction of a CellCache or of a part of it.
Definition at line 50 of file cellcache.h.
FIFE::Zone::Zone | ( | uint32_t | id | ) |
Constructor.
id | A integer value used as identifier. Simple counter values are used. |
Definition at line 260 of file cellcache.cpp.
FIFE::Zone::~Zone | ( | ) |
void FIFE::Zone::addCell | ( | Cell * | cell | ) |
Adds a cell to this zone.
cell | A pointer to cell which should be added. |
Definition at line 270 of file cellcache.cpp.
References FIFE::Cell::getZone(), m_cells, and FIFE::Cell::setZone().
Referenced by FIFE::CellCache::createCells(), and FIFE::CellCache::splitZone().
uint32_t FIFE::Zone::getCellCount | ( | ) | const |
Returns the number of cells.
Definition at line 306 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::CellCache::mergeZones(), and FIFE::CellCache::splitZone().
const std::set< Cell * > & FIFE::Zone::getCells | ( | ) | const |
Returns all cells of this zone.
Definition at line 294 of file cellcache.cpp.
References m_cells.
Referenced by mergeZone().
uint32_t FIFE::Zone::getId | ( | ) | const |
Returns the zone identifier.
Definition at line 302 of file cellcache.cpp.
References m_id.
Returns transistion cells of this zone.
layer | A pointer to the layer which should be the target of the transition. If NULL all transistions be returned. |
Definition at line 310 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::MultiLayerSearch::searchBetweenTargetsMap().
void FIFE::Zone::mergeZone | ( | Zone * | zone | ) |
Merge two zones to one.
zone | A pointer to the old zone. |
Definition at line 285 of file cellcache.cpp.
References getCells(), m_cells, and resetCells().
Referenced by FIFE::CellCache::mergeZones().
void FIFE::Zone::removeCell | ( | Cell * | cell | ) |
Removes a cell from this zone.
cell | A pointer to cell which should be removed. |
Definition at line 277 of file cellcache.cpp.
References m_cells.
Referenced by FIFE::CellCache::splitZone(), and FIFE::Cell::~Cell().
void FIFE::Zone::resetCells | ( | ) |
Remove all cells from zone but does not alter the cells.
Definition at line 298 of file cellcache.cpp.
References m_cells.
Referenced by mergeZone().
|
private |
cells in the zone
Definition at line 105 of file cellcache.h.
Referenced by addCell(), getCellCount(), getCells(), getTransitionCells(), mergeZone(), removeCell(), resetCells(), and ~Zone().
|
private |