#include <IdObject.h>
Public Member Functions | |
Get & set object identifier | |
ident_t | get_id () const |
void | set_id (ident_t id) |
Comparison operators | |
bool | operator< (const IdObject &rhs) const |
bool | operator> (const IdObject &rhs) const |
Protected Member Functions | |
Constructors & destructor | |
IdObject (ident_t id) | |
virtual | ~IdObject () |
Related Functions | |
(Note that these are not member functions.) | |
ostream & | operator<< (ostream &stream, const IdObject &item) |
The IdObject class provides the basic functionality to get and set the object identifier. In addition, instances can be compared based on their ID (equivalence test).
Creates a new instance and sets its identifier to the given id.
id | Numerical identifier |
~IdObject | ( | ) | [protected, virtual] |
Destructor. Destroys the instance.
ident_t get_id | ( | ) | const |
Returns the object's numerical identifier.
bool operator< | ( | const IdObject & | rhs | ) | const |
Returns true, if the instance's numerical identifier is less than the ID of the given object rhs. Returns false otherwise.
This comparison only makes sense if the two objects are of the same type, e.g., both objects are instances of the class Process. However, this is not checked at run-time.
bool operator> | ( | const IdObject & | rhs | ) | const |
Returns true, if the instance's numerical identifier is greater than the ID of the given object rhs. Returns false otherwise.
This comparison only makes sense if the two objects are of the same type, e.g., both objects are instances of the class Process. However, this is not checked at run-time.
void set_id | ( | ident_t | id | ) |
Sets (i.e., overwrites) the object's numerical identifier with the given id.
id | New identifier |
ostream & operator<< | ( | std::ostream & | stream, | |
const IdObject & | item | |||
) | [related] |
![]() |
Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre |