Cross-Platform C++

ot
class ThreadId

#include "ot/base/ThreadId.h"

Represents an abstract thread identifier. A ThreadId uniquely identifies a single Thread for the duration that the Thread is active. After a Thread has terminated its ThreadId may be reused by a new Thread.




Constructor/Destructor Summary
ThreadId()
         Default constructor.
ThreadId(const ThreadId& rhs)
         Copy constructor.
ThreadId(NativeId id)
         Constructs a ThreadId from a native thread identifier as used by the underlying threading library.

Method Summary
 NativeId getNativeId() const
         Returns the native thread identifier.
 bool operator!=(const ThreadId& rhs) const
         Inequality operator.
 ThreadId& operator=(NativeId id)
         Assignment operator.
 bool operator==(const ThreadId& rhs) const
         Equality operator.
 String toString() const
         Returns a string representation of the object.

Typedefs

NativeId

typedef os_thread_id NativeId

Set equal to the thread identifier type of the underlying threading library.

Constructor/Destructor Detail

ThreadId

 ThreadId()
Default constructor.


ThreadId

 ThreadId(const ThreadId& rhs)
Copy constructor.

Parameters:
rhs - the ThreadId to copy

ThreadId

 ThreadId(NativeId id)
Constructs a ThreadId from a native thread identifier as used by the underlying threading library.

Parameters:
id - the native thread identifier

Method Detail

getNativeId

NativeId getNativeId() const
Returns the native thread identifier.


operator!=

bool operator!=(const ThreadId& rhs) const
Inequality operator. Returns true if this ThreadId is not equal to the ThreadId rhs.

Returns:
false if the two ThreadId objects represent the same Thread; true otherwise

operator=

ThreadId& operator=(NativeId id)
Assignment operator. Sets this ThreadId equal to the native thread identifier id.


operator==

bool operator==(const ThreadId& rhs) const
Equality operator. Returns true if this ThreadId is equal to the ThreadId rhs.

Returns:
true if the two ThreadId objects represent the same Thread; false otherwise

toString

String toString() const
Returns a string representation of the object.



Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements