SYNOPSIS

#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

Detailed Description

The MapIndex allows linear access into a MapTable, that otherwise could have its elements being retrieved only by key.

It can be increased, checked and dereferenced like a pointer, by means of suitable operators.

Author:

Sergio Repetto [email protected] Index object to access MapTable elements

Constructor & Destructor Documentation

ost::MapIndex::MapIndex ()\fC [inline]\fP

Creates an empty map index (pointing to nothing).

ost::MapIndex::MapIndex (\fBMapObject\fP *theObject)\fC [inline]\fP

Creates a map index pointing to a specific map object.

Parameters:

the indexed object

ost::MapIndex::MapIndex (const \fBMapIndex\fP &theIndex)\fC [inline]\fP

Creates a copy of a given map index.

Parameters:

the source index object

Member Function Documentation

bool ost::MapIndex::operator!= (const \fBMapIndex\fP &theIndex) const\fC [inline]\fP

bool ost::MapIndex::operator!= (const \fBMapObject\fP *theObject) const\fC [inline]\fP

void* ost::MapIndex::operator* () const\fC [inline]\fP

Dereference operator: the pointed object it is returned as void * for easy re-cast.

Returns:

pointer to indexed object.

\fBMapIndex\fP& ost::MapIndex::operator++ ()

Prefix increment operator, to be used in loops and such.

Returns:

the object itself, as changed.

\fBMapIndex\fP ost::MapIndex::operator++ (int)\fC [inline]\fP

Postfix increment operator, to be used in loops and such.

Returns:

the object itself, as changed.

\fBMapIndex\fP& ost::MapIndex::operator= (\fBMapObject\fP *theObject)

Assignment operator to avoid implicit cast.

Returns:

the object itself, as changed.

bool ost::MapIndex::operator== (const \fBMapIndex\fP &theIndex) const\fC [inline]\fP

Comparison operator, between two MapIndex's.

Returns:

the object itself, as changed.

bool ost::MapIndex::operator== (const \fBMapObject\fP *theObject) const\fC [inline]\fP

Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearness.

Returns:

the object itself, as changed.

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.