Ocular Engine
Ocular::Core::UUID Class Reference

Public Member Functions

 UUID (std::string const &uuid)
 UUID (UUID const &other)
UUIDoperator= (UUID const &)
bool operator== (UUID const &) const
bool operator!= (UUID const &) const
void set (std::string const &uuid)
uint8_t getData (uint32_t const index) const
std::string const & toString () const
uint32_t getHash32 () const
uint64_t getHash64 () const

Protected Attributes

uint32_t m_Hash32
uint64_t m_Hash64
std::string m_String

Member Function Documentation

uint8_t Ocular::Core::UUID::getData ( uint32_t const  index) const

Retrieves an individual octet of the UUID. The UUID is 128 bits in total, or 16 octets.

[in]indexOctet index on range [0,16)
uint32_t Ocular::Core::UUID::getHash32 ( ) const

Retrieves a 32-bit hash of the string representation of the UUID. Example:

131-61-182-198  ->  1972099726
The hash is precomputed.
uint64_t Ocular::Core::UUID::getHash64 ( ) const

Retrieves a 64-bit hash of the string representation of the UUID. Example:

131-61-182-198  ->  6721546136592699182
The hash is precomputed.
void Ocular::Core::UUID::set ( std::string const &  uuid)

Sets the UUID based off of a valid formatted string representation.

std::string const & Ocular::Core::UUID::toString ( ) const

Retrieves a string representation of the UUID in the following form:


Where # is a 32-bit chunk of the UUID data. Example:

The string representation is precomputed.

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