DCMTK
Version 3.6.1 20170228
OFFIS DICOM Toolkit
|
Helper class for generating and storing UUIDs, as specified in ITU-T X.667. More...
Classes | |
struct | BinaryRepresentation |
Public Types | |
enum | E_Representation { ER_RepresentationInteger, ER_RepresentationHex, ER_RepresentationOID, ER_RepresentationURN, ER_RepresentationDefault = ER_RepresentationHex } |
The possible ways to represent a UUID. More... | |
Public Member Functions | |
OFUUID () | |
Default constructor. More... | |
OFUUID (const struct BinaryRepresentation &val) | |
Construct a new UUID from its binary representation. More... | |
void | generate () |
Generate a new UUID. More... | |
OFString & | toString (OFString &result, E_Representation representation=ER_RepresentationDefault) const |
Get the string representation of this UUID. More... | |
STD_NAMESPACE ostream & | print (STD_NAMESPACE ostream &stream, E_Representation representation=ER_RepresentationDefault) const |
Write the string representation of this UUID to a stream. More... | |
void | getBinaryRepresentation (struct BinaryRepresentation &val) const |
Get the binary representation of this UUID. More... | |
OFBool | operator== (const OFUUID &other) const |
Compare this instance to another OFUUID instance. More... | |
OFBool | operator!= (const OFUUID &other) const |
Compare this instance to another OFUUID instance. More... | |
Private Member Functions | |
void | printInteger (STD_NAMESPACE ostream &stream) const |
Print the integer representation to the given stream. More... | |
void | printHex (STD_NAMESPACE ostream &stream) const |
Print the hexadecimal representation to the given stream. More... | |
Private Attributes | |
Uint32 | time_low |
Octets 0-3 of the time field. | |
Uint16 | time_mid |
Octets 4-5 of the time field. | |
Uint16 | version_and_time_high |
4 bits for the version and the 12 highest bits of the time | |
Uint8 | variant_and_clock_seq_high |
2 bits for the variant and the 6 highest bits of the clock sequence | |
Uint8 | clock_seq_low |
The lowest 8 bits of the clock sequence. | |
Uint8 | node [6] |
The node value in the form of a MAC address. | |
Helper class for generating and storing UUIDs, as specified in ITU-T X.667.
A UUID is an Universally Unique IDentifier. If UUIDs are generated correctly, it's almost impossible that the same UUID is generated twice.
struct OFUUID::BinaryRepresentation |
The possible ways to represent a UUID.
OFUUID::OFUUID | ( | ) |
Default constructor.
Generates a new UUID.
OFUUID::OFUUID | ( | const struct BinaryRepresentation & | val | ) |
Construct a new UUID from its binary representation.
val | the binary representation |
void OFUUID::generate | ( | ) |
Generate a new UUID.
The old UUID is discarded.
void OFUUID::getBinaryRepresentation | ( | struct BinaryRepresentation & | val | ) | const |
Get the binary representation of this UUID.
val | the structure where the result should be saved to |
Compare this instance to another OFUUID instance.
other | the other instance |
Compare this instance to another OFUUID instance.
other | the other instance |
STD_NAMESPACE ostream& OFUUID::print | ( | STD_NAMESPACE ostream & | stream, |
E_Representation | representation = ER_RepresentationDefault |
||
) | const |
Write the string representation of this UUID to a stream.
stream | the output stream to write to |
representation | the representation to use |
|
private |
Print the hexadecimal representation to the given stream.
stream | stream to print to. |
|
private |
Print the integer representation to the given stream.
stream | stream to print to. |
OFString& OFUUID::toString | ( | OFString & | result, |
E_Representation | representation = ER_RepresentationDefault |
||
) | const |
Get the string representation of this UUID.
result | string instance to save the result in |
representation | the representation to use |