#include <townarray.h>
Public Member Functions | |
CTown * | get (int x, int y) |
void | set (int x, int y, CTown town) |
void | erase (int x, int y) |
void | clear () |
unsigned int | size () |
CTown * | firstSibling () |
CTown * | nextSibling () |
CTownArray
provides (hopefully) fast access to all towns. Add towns withExample:
// assume ta is our CTownArray CTown* town = ta.get(34, 65); if ( town != 0L ) { } // valid town ta.set(65, 12, town); // iterate through all towns town = ta.firstSibling(); while (town != 0L) { // do something with town... town = ta.nextSibling(); }
Definition at line 53 of file townarray.h.
|
remove all towns (size = 0) Definition at line 82 of file townarray.cpp. |
|
erase CTown at position (x,y) Definition at line 63 of file townarray.cpp. Referenced by WDS::CMap::Update(). |
|
Get first CTown* to iterate through all towns.
Definition at line 115 of file townarray.cpp. |
|
Definition at line 39 of file townarray.cpp. Referenced by WDS::CMap::GetTownAt(), and WDS::CMap::Update(). |
|
Get next CTown* to iterate through all towns.
Definition at line 131 of file townarray.cpp. |
|
add new Definition at line 54 of file townarray.cpp. Referenced by WDS::CMap::Update(). |
|
Definition at line 100 of file townarray.cpp. |