class IdMapper
MyCpp::Referenced
MyCpp::Object
MyCpp::IdMapper

IdMapper is responsible for issuing unique numeric identificators from a given range.

Data fields
Node *topThe parent node.
unsigned long limitMaximum identificator for this IdMapper.

Methods
Node*
add (void *data) throw (OverflowException)
Allocates a new identificator.
Node*
lookup (unsigned long value)
Searches for a node with the given identificator.
void
remove (Node *node)
Removes a node from the mapper.
void
clear ()
Clears the mapper, removing all identificator mappings.
IdMapper (unsigned long limit)
The constructor.
add

Allocates a new identificator.

Node* add (void *data) throw (OverflowException)
data :  User's data to be associated with the new identificator.
lookup

Searches for a node with the given identificator.

Node* lookup (unsigned long value)
value :  The idntificator of the node to be found.
remove

Removes a node from the mapper.

void remove (Node *node)
node :  The node to be removed from the mapper.
clear

Clears the mapper, removing all identificator mappings.

void clear ()
IdMapper

The constructor.

IdMapper (unsigned long limit)
limit :  Maximum identificator for this IdMapper.