#include <object.h>
Public Member Functions | |
MapIndex () | |
Creates an empty map index (pointing to nothing). | |
MapIndex (MapObject *theObject) | |
Creates a map index pointing to a specific map object. | |
MapIndex (const MapIndex &theIndex) | |
Creates a copy of a given map index. | |
void * | operator* () const |
Dereference operator: the pointed object it is returned as void * for easy re-cast. | |
MapIndex & | operator= (MapObject *theObject) |
Assignment operator to avoid implicit cast. | |
MapIndex & | operator++ () |
Prefix increment operator, to be used in loops and such. | |
MapIndex | operator++ (int) |
Postfix increment operator, to be used in loops and such. | |
bool | operator== (const MapIndex &theIndex) const |
Comparison operator, between two MapIndex's. | |
bool | operator!= (const MapIndex &theIndex) const |
bool | operator== (const MapObject *theObject) const |
Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearness. | |
bool | operator!= (const MapObject *theObject) const |
It can be increased, checked and dereferenced like a pointer, by means of suitable operators.
ost::MapIndex::MapIndex | ( | ) | [inline] |
Creates an empty map index (pointing to nothing).
ost::MapIndex::MapIndex | ( | MapObject * | theObject | ) | [inline] |
Creates a map index pointing to a specific map object.
the | indexed object |
ost::MapIndex::MapIndex | ( | const MapIndex & | theIndex | ) | [inline] |
Creates a copy of a given map index.
the | source index object |
bool ost::MapIndex::operator!= | ( | const MapObject * | theObject | ) | const [inline] |
bool ost::MapIndex::operator!= | ( | const MapIndex & | theIndex | ) | const [inline] |
void* ost::MapIndex::operator* | ( | ) | const [inline] |
Dereference operator: the pointed object it is returned as void * for easy re-cast.
MapIndex ost::MapIndex::operator++ | ( | int | ) | [inline] |
Postfix increment operator, to be used in loops and such.
References operator++().
Referenced by operator++().
MapIndex& ost::MapIndex::operator++ | ( | ) |
Prefix increment operator, to be used in loops and such.
Assignment operator to avoid implicit cast.
bool ost::MapIndex::operator== | ( | const MapObject * | theObject | ) | const [inline] |
bool ost::MapIndex::operator== | ( | const MapIndex & | theIndex | ) | const [inline] |
Comparison operator, between two MapIndex's.
References thisObject.