ost::MapIndex Class Reference

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

#include <object.h>

Collaboration diagram for ost::MapIndex:
Collaboration graph
[legend]

Public Member Functions

 MapIndex (const MapIndex &theIndex)
 Creates a copy of a given map index.
 MapIndex (MapObject *theObject)
 Creates a map index pointing to a specific map object.
 MapIndex ()
 Creates an empty map index (pointing to nothing).
bool operator!= (const MapObject *theObject) const
bool operator!= (const MapIndex &theIndex) const
void * operator* () const
 Dereference operator: the pointed object it is returned as void * for easy re-cast.
MapIndex operator++ (int)
 Postfix increment operator, to be used in loops and such.
MapIndexoperator++ ()
 Prefix increment operator, to be used in loops and such.
MapIndexoperator= (MapObject *theObject)
 Assignment operator to avoid implicit cast.
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 MapIndex &theIndex) const
 Comparison operator, between two MapIndex's.

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 <s.repetto@pentaengineering.it> Index object to access MapTable elements

Definition at line 469 of file object.h.


Constructor & Destructor Documentation

ost::MapIndex::MapIndex ( MapObject theObject  )  [inline]

Creates a map index pointing to a specific map object.

Parameters:
the indexed object

Definition at line 486 of file object.h.

ost::MapIndex::MapIndex ( const MapIndex theIndex  )  [inline]

Creates a copy of a given map index.

Parameters:
the source index object

Definition at line 494 of file object.h.


Member Function Documentation

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

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

Returns:
pointer to indexed object.

Definition at line 503 of file object.h.

MapIndex ost::MapIndex::operator++ ( int   )  [inline]

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

Returns:
the object itself, as changed.

Definition at line 525 of file object.h.

Here is the call graph for this function:

MapIndex& ost::MapIndex::operator++ (  ) 

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

Returns:
the object itself, as changed.
MapIndex& ost::MapIndex::operator= ( MapObject theObject  ) 

Assignment operator to avoid implicit cast.

Returns:
the object itself, as changed.
bool ost::MapIndex::operator== ( const MapObject theObject  )  const [inline]

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

Returns:
the object itself, as changed.

Definition at line 545 of file object.h.

bool ost::MapIndex::operator== ( const MapIndex theIndex  )  const [inline]

Comparison operator, between two MapIndex's.

Returns:
the object itself, as changed.

Definition at line 533 of file object.h.


The documentation for this class was generated from the following file:

Generated on 24 Sep 2014 for ucommon by  doxygen 1.6.1