This class implements a platform independent wrapper for thread ids.
More...
#include <Thread.h>
|
| ThreadId ()=default |
| Creates a new thread id object with invalid id value.
|
|
bool | isValid () const |
| Returns whether this object holds a valid id.
|
|
uint64_t | hash () const |
| Returns the hash value of this thread id.
|
|
bool | operator== (const ThreadId &id) const |
| Returns whether two thread id objects are identical.
|
|
bool | operator!= (const ThreadId &id) const |
| Returns whether two thread id objects are not identical.
|
|
bool | operator< (const ThreadId &id) const |
| Compares two thread id objects by their hash values.
|
|
|
| ThreadId (const uint64_t value) |
| Creates a new thread id object.
|
|
|
static constexpr uint64_t | invalidThreadId () |
| Returns an invalid thread id value.
|
|
This class implements a platform independent wrapper for thread ids.
◆ ThreadId() [1/2]
Ocean::Thread::ThreadId::ThreadId |
( |
| ) |
|
|
default |
Creates a new thread id object with invalid id value.
◆ ThreadId() [2/2]
Ocean::Thread::ThreadId::ThreadId |
( |
const uint64_t |
value | ) |
|
|
inlineexplicitprotected |
Creates a new thread id object.
- Parameters
-
value | The value to be wrapped by the new object |
◆ hash()
uint64_t Ocean::Thread::ThreadId::hash |
( |
| ) |
const |
|
inline |
Returns the hash value of this thread id.
On platforms directly providing a unique integer thread id as value the hash value is exactly that integer value.
- Returns
- The unique hash value of this thread id
◆ invalidThreadId()
constexpr uint64_t Ocean::Thread::ThreadId::invalidThreadId |
( |
| ) |
|
|
staticconstexprprotected |
Returns an invalid thread id value.
- Returns
- The invalid thread id value
◆ isValid()
bool Ocean::Thread::ThreadId::isValid |
( |
| ) |
const |
|
inline |
Returns whether this object holds a valid id.
- Returns
- True, if succeeded
◆ operator!=()
bool Ocean::Thread::ThreadId::operator!= |
( |
const ThreadId & |
id | ) |
const |
|
inline |
Returns whether two thread id objects are not identical.
- Parameters
-
id | The second thread id to compare |
- Returns
- True, if succeeded
◆ operator<()
bool Ocean::Thread::ThreadId::operator< |
( |
const ThreadId & |
id | ) |
const |
|
inline |
Compares two thread id objects by their hash values.
- Parameters
-
id | The second thread id to compare |
- Returns
- True, if the hash value of this object is smaller than the hash value of the second object
◆ operator==()
bool Ocean::Thread::ThreadId::operator== |
( |
const ThreadId & |
id | ) |
const |
|
inline |
Returns whether two thread id objects are identical.
- Parameters
-
id | The second thread id to compare |
- Returns
- True, if succeeded
◆ Thread
◆ value_
The value of the thread id.
The documentation for this class was generated from the following file: