9#ifndef CPPCOMMON_SYSTEM_UUID_H
10#define CPPCOMMON_SYSTEM_UUID_H
14#include "ns3/object.h"
43 explicit UUID(
const std::string&
uuid);
83 std::string
string()
const;
94 { os <<
uuid.string();
return os; }
Universally unique identifier(UUID)
UUID & operator=(const std::array< uint8_t, 16 > &data)
UUID()
Default constructor.
friend bool operator<(const UUID &uuid1, const UUID &uuid2)
UUID & operator=(const UUID &)=default
friend void swap(UUID &uuid1, UUID &uuid2) noexcept
friend bool operator>(const UUID &uuid1, const UUID &uuid2)
UUID(const std::array< uint8_t, 16 > &data)
Initialize UUID with a given 16 bytes data buffer.
const std::array< uint8_t, 16 > & data() const noexcept
Get the UUID data buffer.
friend bool operator<=(const UUID &uuid1, const UUID &uuid2)
UUID(const UUID &)=default
friend bool operator>=(const UUID &uuid1, const UUID &uuid2)
static UUID Random()
Generate random UUID4(randomly or pseudo-randomly generated version)
friend std::ostream & operator<<(std::ostream &os, const UUID &uuid)
Output instance into the given output stream.
static UUID Nil()
Generate nil UUID0(all bits set to zero)
static UUID Sequential()
Generate sequential UUID1(time based version)
friend bool operator!=(const UUID &uuid1, const UUID &uuid2)
std::string string() const
Get string from the current UUID in format "00000000-0000-0000-0000-000000000000".
UUID & operator=(UUID &&) noexcept=default
std::array< uint8_t, 16 > _data
std::array< uint8_t, 16 > & data() noexcept
Get the UUID data buffer.
UUID(UUID &&) noexcept=default
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.