#include <Unique.h>
Public Types | |
typedef long | Value_t |
The type generated by Unique. | |
Public Member Functions | |
Unique () | |
~Unique () | |
Static Public Member Functions | |
static Value_t | get () |
The main public static method, which generates the next unique value. | |
static Value_t | lockedGet () |
The actual type for the Value_t parameter is long, so you can generate unique values up until you reach MAX_LONG. Since we just need to access the static get method, there is really no reason to even instantiate a Unique object, just call Unique::get
typedef long Unique::Value_t |
The type generated by Unique.
Unique::Unique | ( | ) | [inline] |
Unique::~Unique | ( | ) | [inline] |
static Value_t Unique::get | ( | ) | [inline, static] |
The main public static method, which generates the next unique value.
This is thread safe either by using a mutex or by ensuring atomic access otherwise.
References Pooma::DummyMutex::lock(), and Pooma::DummyMutex::unlock().
static Value_t Unique::lockedGet | ( | ) | [inline, static] |