galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::UUID Class Referencefinal

Contains a 128bit randomly generated UUID, along with helper functions. More...

#include <UUID.hpp>

+ Collaboration diagram for galaxy::UUID:

Public Member Functions

 UUID ()
 Constructor.
 
 UUID (UUID &&) noexcept
 Move constructor.
 
UUIDoperator= (UUID &&) noexcept
 Move assignment operator.
 
 UUID (const UUID &) noexcept
 Copy constructor.
 
UUIDoperator= (const UUID &) noexcept
 Copy assignment operator.
 
 ~UUID () noexcept
 Destructor.
 
std::size_t hash () noexcept
 Get the UUID as a hash.
 
const std::string & str () const noexcept
 Get the UUID as a string.
 
bool operator== (const UUID &rhs) noexcept
 Equality comparison.
 
bool operator!= (const UUID &rhs) noexcept
 Inequality comparison.
 

Private Attributes

std::array< unsigned char, 16 > m_uuid
 UUID.
 
std::string m_str
 String representation.
 

Detailed Description

Contains a 128bit randomly generated UUID, along with helper functions.

Definition at line 20 of file UUID.hpp.

Constructor & Destructor Documentation

◆ UUID() [1/3]

galaxy::UUID::UUID ( )

Constructor.

Definition at line 16 of file UUID.cpp.

◆ UUID() [2/3]

galaxy::UUID::UUID ( UUID && g)
noexcept

Move constructor.

Definition at line 45 of file UUID.cpp.

◆ UUID() [3/3]

galaxy::UUID::UUID ( const UUID & g)
noexcept

Copy constructor.

Definition at line 62 of file UUID.cpp.

◆ ~UUID()

galaxy::UUID::~UUID ( )
noexcept

Destructor.

Definition at line 79 of file UUID.cpp.

Member Function Documentation

◆ operator=() [1/2]

UUID & galaxy::UUID::operator= ( UUID && g)
noexcept

Move assignment operator.

Definition at line 51 of file UUID.cpp.

◆ operator=() [2/2]

UUID & galaxy::UUID::operator= ( const UUID & g)
noexcept

Copy assignment operator.

Definition at line 68 of file UUID.cpp.

◆ hash()

std::size_t galaxy::UUID::hash ( )
nodiscardnoexcept

Get the UUID as a hash.

Returns
Hash integer.

Definition at line 83 of file UUID.cpp.

+ Here is the caller graph for this function:

◆ str()

const std::string & galaxy::UUID::str ( ) const
nodiscardnoexcept

Get the UUID as a string.

Returns
Const string reference.

Definition at line 93 of file UUID.cpp.

+ Here is the caller graph for this function:

◆ operator==()

bool galaxy::UUID::operator== ( const UUID & rhs)
nodiscardnoexcept

Equality comparison.

Parameters
rhsRight-hand side comparison.
Returns
True if equal.

Definition at line 98 of file UUID.cpp.

◆ operator!=()

bool galaxy::UUID::operator!= ( const UUID & rhs)
nodiscardnoexcept

Inequality comparison.

Parameters
rhsRight-hand side comparison.
Returns
True if NOT equal.

Definition at line 103 of file UUID.cpp.

Member Data Documentation

◆ m_uuid

std::array<unsigned char, 16> galaxy::UUID::m_uuid
private

UUID.

Definition at line 95 of file UUID.hpp.

◆ m_str

std::string galaxy::UUID::m_str
private

String representation.

Definition at line 100 of file UUID.hpp.


The documentation for this class was generated from the following files: