#include <UUID.h>
Type to represent UTC as a count of 100 nanosecond intervals since 00:00:00.00, 15 October 1582.
Enumerator |
---|
ACE_UUID_CLOCK_SEQ_MASK |
|
ACE_Utils::UUID_Generator::UUID_Generator |
( |
void |
| ) |
|
ACE_Utils::UUID_Generator::~UUID_Generator |
( |
void |
| ) |
|
void ACE_Utils::UUID_Generator::generate_UUID |
( |
UUID & |
uuid, |
|
|
ACE_UINT16 |
version = 0x0001 , |
|
|
u_char |
variant = 0x80 |
|
) |
| |
Format timestamp, clockseq, and nodeID into an UUID of the specified version and variant. For generating UUID's with thread and process ids use variant=0xc0
UUID * ACE_Utils::UUID_Generator::generate_UUID |
( |
ACE_UINT16 |
version = 0x0001 , |
|
|
u_char |
variant = 0x80 |
|
) |
| |
Format timestamp, clockseq, and nodeID into a VI UUID. For generating UUID's with thread and process ids use variant=0xc0
void ACE_Utils::UUID_Generator::get_systemtime |
( |
UUID_Time & |
timestamp | ) |
|
|
private |
Obtain the system time in UTC as a count of 100 nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of Gregorian reform to the Christian calendar).
ACE_Time_Value is in POSIX time, seconds since Jan 1, 1970. UUIDs use time in 100ns ticks since 15 October 1582. The difference is: 15 Oct 1582 - 1 Jan 1600: 17 days in Oct, 30 in Nov, 31 in Dec + 17 years and 4 leap days (1584, 88, 92 and 96) 1 Jan 1600 - 1 Jan 1900: 3 centuries + 73 leap days ( 25 in 17th cent. and 24 each in 18th and 19th centuries) 1 Jan 1900 - 1 Jan 1970: 70 years + 17 leap days. This adds up, in days: (17+30+31+365*17+4)+ (365*300+73)+ (365*70+17) or 122192928000000000U (0x1B21DD213814000) 100 ns ticks.
Get the time of day, convert to 100ns ticks then add the offset.
void ACE_Utils::UUID_Generator::get_timestamp |
( |
UUID_Time & |
timestamp | ) |
|
|
private |
Obtain a UUID timestamp. Compensate for the fact that the time obtained from getSystem time has a resolution less than 100ns.
Obtain a new timestamp. If UUID's are being generated too quickly the clock sequence will be incremented
void ACE_Utils::UUID_Generator::get_timestamp_and_clocksequence |
( |
UUID_Time & |
timestamp, |
|
|
ACE_UINT16 & |
clockSequence |
|
) |
| |
|
private |
Obtain a UUID timestamp and clock sequence. Compensate for the fact that the time obtained from getSystem time has a resolution less than 100ns.
void ACE_Utils::UUID_Generator::init |
( |
void |
| ) |
|
Initialize the UUID generator
- Deprecated:
- This method may go away in some future release.
The locking strategy prevents multiple generators from accessing the UUID_state at the same time. Get the locking strategy.
void ACE_Utils::UUID_Generator::lock |
( |
ACE_SYNCH_MUTEX * |
lock, |
|
|
bool |
release_lock |
|
) |
| |
Set a new locking strategy and return the old one.
bool ACE_Utils::UUID_Generator::destroy_lock_ |
|
private |
bool ACE_Utils::UUID_Generator::is_init_ |
|
private |
Initalization state of the generator.
UUID_Time ACE_Utils::UUID_Generator::time_last_ |
|
private |
The system time when that last uuid was generated.
The UUID generator persistent state.
The documentation for this class was generated from the following files: