Universally unique identifier(UUID) More...
#include "uuid.h"
Collaboration diagram for ns3::UUID:Public Member Functions | |
| UUID () | |
| Default constructor. | |
| UUID (const std::array< uint8_t, 16 > &data) | |
| Initialize UUID with a given 16 bytes data buffer. | |
| UUID (const std::string &uuid) | |
| Initialize UUID with a given string. | |
| UUID (const UUID &)=default | |
| UUID (UUID &&) noexcept=default | |
| ~UUID ()=default | |
| const std::array< uint8_t, 16 > & | data () const noexcept |
| Get the UUID data buffer. | |
| std::array< uint8_t, 16 > & | data () noexcept |
| Get the UUID data buffer. | |
| operator bool () const noexcept | |
| Check if the UUID is nil UUID0(all bits set to zero) | |
| UUID & | operator= (const std::array< uint8_t, 16 > &data) |
| UUID & | operator= (const std::string &uuid) |
| UUID & | operator= (const UUID &)=default |
| UUID & | operator= (UUID &&) noexcept=default |
| std::string | string () const |
| Get string from the current UUID in format "00000000-0000-0000-0000-000000000000". | |
| void | swap (UUID &uuid) noexcept |
| Swap two instances. | |
Static Public Member Functions | |
| static UUID | Nil () |
| Generate nil UUID0(all bits set to zero) | |
| static UUID | Random () |
| Generate random UUID4(randomly or pseudo-randomly generated version) | |
| static UUID | Sequential () |
| Generate sequential UUID1(time based version) | |
Private Attributes | |
| std::array< uint8_t, 16 > | _data |
Friends | |
| bool | operator!= (const UUID &uuid1, const UUID &uuid2) |
| bool | operator< (const UUID &uuid1, const UUID &uuid2) |
| std::ostream & | operator<< (std::ostream &os, const UUID &uuid) |
| Output instance into the given output stream. | |
| bool | operator<= (const UUID &uuid1, const UUID &uuid2) |
| bool | operator== (const UUID &uuid1, const UUID &uuid2) |
| bool | operator> (const UUID &uuid1, const UUID &uuid2) |
| bool | operator>= (const UUID &uuid1, const UUID &uuid2) |
| void | swap (UUID &uuid1, UUID &uuid2) noexcept |
Universally unique identifier(UUID)
A universally unique identifier(UUID) is an identifier standard used in software construction. This implementation generates the following UUID types:
A UUID is simply a 128-bit value: "123e4567-e89b-12d3-a456-426655440000"
Not thread-safe.
https://en.wikipedia.org/wiki/Universally_unique_identifier https://www.ietf.org/rfc/rfc4122.txt
|
inline |
Default constructor.
Definition at line 38 of file uuid.h.
References _data.
Referenced by Nil(), operator=(), Random(), and Sequential().
Here is the caller graph for this function:
|
explicit |
Initialize UUID with a given string.
| uuid | - UUID string |
Definition at line 37 of file uuid.cc.
References _data, ns3::Create(), and NS_FATAL_ERROR.
Here is the call graph for this function:
|
inlineexplicit |
|
defaultnoexcept |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
Get the UUID data buffer.
Definition at line 78 of file uuid.h.
References _data.
Referenced by operator=(), and operator=().
Here is the caller graph for this function:Generate nil UUID0(all bits set to zero)
Definition at line 86 of file uuid.h.
References UUID().
Referenced by operator bool().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineexplicitnoexcept |
|
static |
Generate random UUID4(randomly or pseudo-randomly generated version)
Definition at line 148 of file uuid.cc.
References UUID(), _data, ns3::Create(), and NS_FATAL_ERROR.
Here is the call graph for this function:
|
static |
Generate sequential UUID1(time based version)
Definition at line 92 of file uuid.cc.
References UUID(), _data, ns3::Create(), and NS_FATAL_ERROR.
Referenced by ns3::QKDAppHelper::InstallKeyManager(), ns3::QKDAppHelper::InstallKeyManager(), ns3::QKDAppHelper::InstallPostProcessing(), and ns3::QKDAppHelper::InstallQKDApplication().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string ns3::UUID::string | ( | ) | const |
Get string from the current UUID in format "00000000-0000-0000-0000-000000000000".
Definition at line 74 of file uuid.cc.
References _data, ns3::Create(), and ns3::value().
Referenced by ns3::QKDKeyManagerSystemApplication::GenerateUUID(), ns3::QKDAppHelper::InstallKeyManager(), ns3::QKDAppHelper::InstallKeyManager(), ns3::QKDAppHelper::InstallPostProcessing(), and ns3::QKDAppHelper::InstallQKDApplication().
Here is the call graph for this function:
Here is the caller graph for this function:Swap two instances.
Definition at line 205 of file uuid.cc.
References ns3::Create(), std::swap(), and ns3::swap().
Here is the call graph for this function:
|
private |
Definition at line 101 of file uuid.h.
Referenced by UUID(), UUID(), data(), data(), operator=(), operator=(), Random(), Sequential(), and string().