A unique id of the form x.y.z, where x and z are positive numbers and y is non-negative. More...
#include <UniqueId.hh>
Public Member Functions | |
UniqueId () | |
Default constructor. More... | |
UniqueId (const int _x, const int _y, const int _z) | |
Constructor. More... | |
UniqueId (const UniqueId &_other) | |
Copy constructor. More... | |
virtual | ~UniqueId () |
Destructor. More... | |
bool | operator!= (const UniqueId &_other) const |
Inequality. More... | |
UniqueId & | operator= (const UniqueId &_other) |
Assignment operator. More... | |
bool | operator== (const UniqueId &_other) const |
Equality operator, result = this == _other. More... | |
bool | SetX (const int _x) |
Set the 'x' value. More... | |
bool | SetY (const int _y) |
Set the 'y' value. More... | |
bool | SetZ (const int _z) |
Set the 'z' value. More... | |
bool | Valid () const |
Whether the object is valid or not. More... | |
int | X () const |
Get 'x' value. More... | |
int | Y () const |
Get the 'y' value. More... | |
int | Z () const |
Get the 'z' value. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const UniqueId &_id) |
Stream insertion operator. More... | |
A unique id of the form x.y.z, where x and z are positive numbers and y is non-negative.
The reason to support this is because the perimeter Ids are always 0.
manifold::rndf::UniqueId::UniqueId | ( | ) |
Default constructor.
|
explicit |
Constructor.
[in] | _x | A positive number. |
[in] | _y | A non-negative number. |
[in] | _z | A positive number. |
manifold::rndf::UniqueId::UniqueId | ( | const UniqueId & | _other | ) |
Copy constructor.
[in] | _other | Other UniqueId. |
|
virtual |
Destructor.
bool manifold::rndf::UniqueId::operator!= | ( | const UniqueId & | _other | ) | const |
bool manifold::rndf::UniqueId::operator== | ( | const UniqueId & | _other | ) | const |
Equality operator, result = this == _other.
[in] | _other | UniqueId to check for equality. |
bool manifold::rndf::UniqueId::SetX | ( | const int | _x | ) |
Set the 'x' value.
[in] | _id | New 'x' value. |
bool manifold::rndf::UniqueId::SetY | ( | const int | _y | ) |
Set the 'y' value.
[in] | _y | New 'y' value. |
bool manifold::rndf::UniqueId::SetZ | ( | const int | _z | ) |
Set the 'z' value.
[in] | _z | New 'z' value. |
bool manifold::rndf::UniqueId::Valid | ( | ) | const |
Whether the object is valid or not.
int manifold::rndf::UniqueId::X | ( | ) | const |
Get 'x' value.
int manifold::rndf::UniqueId::Y | ( | ) | const |
Get the 'y' value.
int manifold::rndf::UniqueId::Z | ( | ) | const |
Get the 'z' value.
|
friend |
Stream insertion operator.
[out] | _out | The output stream. |
[in] | _id | UniqueId to write to the stream. |