Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Friends | List of all members
Mezzanine::Threading::ThreadId Class Reference

The thread ID is a unique identifier for each thread. More...

#include <thread.h>

Public Member Functions

 ThreadId ()
 Default constructor. More...
 
 ThreadId (unsigned long int aId)
 Creation from long. More...
 
 ThreadId (const ThreadId &aId)
 Copy constructor. More...
 
ThreadIdoperator= (const ThreadId &aId)
 Assignment Operator. More...
 

Friends

bool operator!= (const ThreadId &aId1, const ThreadId &aId2)
 Inequality Comparison. More...
 
bool operator< (const ThreadId &aId1, const ThreadId &aId2)
 Greater than Comparison. More...
 
std::ostream & operator<< (std::ostream &os, const ThreadId &obj)
 Output Streaming operator. More...
 
bool operator<= (const ThreadId &aId1, const ThreadId &aId2)
 Greater than or equal to Comparison. More...
 
bool operator== (const ThreadId &aId1, const ThreadId &aId2)
 Equality Comparison. More...
 
bool operator> (const ThreadId &aId1, const ThreadId &aId2)
 Less than Comparison. More...
 
bool operator>= (const ThreadId &aId1, const ThreadId &aId2)
 Less than or equal to Comparison. More...
 

Detailed Description

The thread ID is a unique identifier for each thread.

See also
thread::get_id()

Definition at line 209 of file thread.h.

Constructor & Destructor Documentation

Mezzanine::Threading::ThreadId::ThreadId ( )
inline

Default constructor.

The default constructed ID is that of thread without a thread of execution.

Definition at line 215 of file thread.h.

Mezzanine::Threading::ThreadId::ThreadId ( unsigned long int  aId)
inline

Creation from long.

Parameters
aIdThe OS provided long to create an ID from.

Definition at line 220 of file thread.h.

Mezzanine::Threading::ThreadId::ThreadId ( const ThreadId aId)
inline

Copy constructor.

Parameters
aIdThe other id to create a copy of.

Definition at line 225 of file thread.h.

Member Function Documentation

ThreadId& Mezzanine::Threading::ThreadId::operator= ( const ThreadId aId)
inline

Assignment Operator.

Parameters
aIdThe right hand operand during assignment.
Returns
A reference to the left hand operand after it has been assigned.

Definition at line 231 of file thread.h.

Friends And Related Function Documentation

bool operator!= ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Inequality Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
False boolean value if the OS specific IDs match and true otherwise.

Definition at line 248 of file thread.h.

bool operator< ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Greater than Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
A consistent value to allow for sorting/ordering of threads.

Definition at line 262 of file thread.h.

std::ostream& operator<< ( std::ostream &  os,
const ThreadId obj 
)
friend

Output Streaming operator.

Parameters
osThe output stream to send the id into.
objthe streamed id.
Returns
A reference to the output stream to allow for operator chaining.

Definition at line 284 of file thread.h.

bool operator<= ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Greater than or equal to Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
A consistent value to allow for sorting/ordering of threads.

Definition at line 255 of file thread.h.

bool operator== ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Equality Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
True boolean value if the OS specific IDs match and false otherwise.

Definition at line 241 of file thread.h.

bool operator> ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Less than Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
A consistent value to allow for sorting/ordering of threads.

Definition at line 276 of file thread.h.

bool operator>= ( const ThreadId aId1,
const ThreadId aId2 
)
friend

Less than or equal to Comparison.

Parameters
aId1Left hand operand.
aId2Right hand operand.
Returns
A consistent value to allow for sorting/ordering of threads.

Definition at line 269 of file thread.h.


The documentation for this class was generated from the following file: