This class provides a 128 bit id which is unique.
More...
|
| UniqueId () |
| Creates a new invalid id. More...
|
|
| UniqueId (unsigned long long a, unsigned long long b) |
| Creates a new unique id by two 64 bit values. More...
|
|
| UniqueId (const bool createUniqueId) |
| Creates a new unique id. More...
|
|
void | newUniqueId () |
| Modifies this id and sets a new unique id value. More...
|
|
bool | isValid () const |
| Returns whether this object holds a valid unique id. More...
|
|
std::string | string () const |
| Returns this unique id as string. More...
|
|
std::string | shortString () const |
| Returns a very short part of this unique id as string. More...
|
|
const unsigned long long * | operator() () const |
| Returns a pointer to two 64 bit values defining the id. More...
|
|
bool | operator< (const UniqueId &uniqueId) const |
| Compares two id objects and returns whether the left one has a smaller id than the right one. More...
|
|
bool | operator== (const UniqueId &uniqueId) const |
| Returns whether two id objects have the same id value. More...
|
|
bool | operator!= (const UniqueId &uniqueId) const |
| Returns whether two id objects have not the same id value. More...
|
|
|
unsigned long long | value [2] |
| The two 64 bit values defining the id value. More...
|
|
This class provides a 128 bit id which is unique.
◆ UniqueId() [1/3]
Ocean::Platform::UniqueId::UniqueId |
( |
| ) |
|
|
inline |
Creates a new invalid id.
◆ UniqueId() [2/3]
Ocean::Platform::UniqueId::UniqueId |
( |
unsigned long long |
a, |
|
|
unsigned long long |
b |
|
) |
| |
|
inline |
Creates a new unique id by two 64 bit values.
- Parameters
-
a | First 64 bit value |
b | Second 64 bit value |
◆ UniqueId() [3/3]
Ocean::Platform::UniqueId::UniqueId |
( |
const bool |
createUniqueId | ) |
|
|
inlineexplicit |
Creates a new unique id.
- Parameters
-
createUniqueId | True, to initialize this object with a valid unique id; False, to create in invalid id |
◆ isValid()
bool Ocean::Platform::UniqueId::isValid |
( |
| ) |
const |
|
inline |
Returns whether this object holds a valid unique id.
- Returns
- True, if so
◆ newUniqueId()
void Ocean::Platform::UniqueId::newUniqueId |
( |
| ) |
|
|
inline |
Modifies this id and sets a new unique id value.
◆ operator!=()
bool Ocean::Platform::UniqueId::operator!= |
( |
const UniqueId & |
uniqueId | ) |
const |
|
inline |
Returns whether two id objects have not the same id value.
- Parameters
-
uniqueId | The second unique id object |
- Returns
- True, if so
◆ operator()()
const unsigned long long * Ocean::Platform::UniqueId::operator() |
( |
| ) |
const |
|
inline |
Returns a pointer to two 64 bit values defining the id.
- Returns
- The 64 bit values
◆ operator<()
bool Ocean::Platform::UniqueId::operator< |
( |
const UniqueId & |
uniqueId | ) |
const |
|
inline |
Compares two id objects and returns whether the left one has a smaller id than the right one.
- Parameters
-
uniqueId | The right unique id object |
- Returns
- True, if so
◆ operator==()
bool Ocean::Platform::UniqueId::operator== |
( |
const UniqueId & |
uniqueId | ) |
const |
|
inline |
Returns whether two id objects have the same id value.
- Parameters
-
uniqueId | The second unique id object |
- Returns
- True, if so
◆ shortString()
std::string Ocean::Platform::UniqueId::shortString |
( |
| ) |
const |
|
inline |
Returns a very short part of this unique id as string.
The short string contains four characters of the normal string (representing the first two bytes of information).
Beware: The short string should be used for userfriendly output information only because this string is not unique anymore!
- Returns
- The id as string
◆ string()
std::string Ocean::Platform::UniqueId::string |
( |
| ) |
const |
|
inline |
Returns this unique id as string.
- Returns
- The id as string
◆ value
unsigned long long Ocean::Platform::UniqueId::value[2] |
|
protected |
The two 64 bit values defining the id value.
The documentation for this class was generated from the following file: