A generator for unique ids. More...
#include <OpenMS/CONCEPT/UniqueIdGenerator.h>
Static Public Member Functions | |
static UInt64 | getUniqueId () |
Returns a new unique id. More... | |
static void | setSeed (const DateTime &) |
Initializes random generator using the given DateTime instead of DateTime::now(). This is intended for debugging and testing. More... | |
static Param const & | getInfo () |
Returns a summary of internal status. More... | |
Private Member Functions | |
UniqueIdGenerator () | |
~UniqueIdGenerator () | |
void | init_ (const DateTime &date_time) |
Static Private Member Functions | |
static UniqueIdGenerator & | getInstance_ () |
Private Attributes | |
Param | info_ |
A generator for unique ids.
The unique ids are 64-bit random unsigned random integers. The class is implemented as a singleton. The random generator is initialized upon startup using the current system time and date. Collisions are not excluded by design, but extremely unlikely. (To estimate the probability of collisions, note that , so it is unlikely you will see one in your lifetime.)
|
private |
|
private |
|
static |
Returns a summary of internal status.
|
staticprivate |
|
static |
Returns a new unique id.
Referenced by UniqueIdInterface::ensureUniqueId(), and UniqueIdInterface::setUniqueId().
|
private |
|
static |
Initializes random generator using the given DateTime instead of DateTime::now(). This is intended for debugging and testing.
|
private |
OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:28 using doxygen 1.8.5 |