HOPS
HOPS class reference
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
hops::MHO_UUID Class Reference

Class MHO_UUID - a class for a 16 byte UUID (for object and type identification) More...

#include <MHO_UUID.hh>

Classes

union  byte2ints
 

Public Member Functions

 MHO_UUID ()
 
 MHO_UUID (const MHO_UUID &copy)
 
virtual ~MHO_UUID ()
 
uint64_t as_long () const
 
std::string as_string () const
 
uint64_t as_truncated_long (bool first_half=true) const
 
bool from_string (const std::string &uuid_str)
 
bool is_empty () const
 
bool operator!= (const MHO_UUID &rhs) const
 
bool operator< (const MHO_UUID &rhs) const
 
MHO_UUIDoperator= (const MHO_UUID &rhs)
 
bool operator== (const MHO_UUID &rhs) const
 
uint8_t & operator[] (std::size_t i)
 
const uint8_t & operator[] (std::size_t i) const
 
uint64_t size () const
 

Static Public Member Functions

static uint64_t ByteSize ()
 

Protected Attributes

uint8_t fBytes [MHO_UUID_LENGTH]
 

Detailed Description

Class MHO_UUID - a class for a 16 byte UUID (for object and type identification)

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Wed Apr 21 13:40:18 2021 -0400

Class Documentation

◆ hops::MHO_UUID::byte2ints

union hops::MHO_UUID::byte2ints
Class Members
uint8_t byte_values[MHO_UUID_LENGTH]
uint64_t uint_values[2]

Constructor & Destructor Documentation

◆ MHO_UUID() [1/2]

hops::MHO_UUID::MHO_UUID ( )
inline

◆ ~MHO_UUID()

virtual hops::MHO_UUID::~MHO_UUID ( )
inlinevirtual

◆ MHO_UUID() [2/2]

hops::MHO_UUID::MHO_UUID ( const MHO_UUID copy)
inline

Member Function Documentation

◆ as_long()

uint64_t hops::MHO_UUID::as_long ( ) const
inline
  • Split the UUID byte array into two halves conver to uint64_t and return the sum
    Returns
    A uint64_t composed of the sum of the two halves of the uuid

◆ as_string()

std::string hops::MHO_UUID::as_string ( ) const
inline
  • Convert the UUID byte array into a string
    Returns
    A std::string containing the hexadecimal digits of the UUID.

◆ as_truncated_long()

uint64_t hops::MHO_UUID::as_truncated_long ( bool  first_half = true) const
inline
  • Truncate the UUID byte array to the first (last) 8 bytes and convert into a 64 bit int
    Returns
    A uint64_t composed of the first or last 8 bytes of the UUID

◆ ByteSize()

static uint64_t hops::MHO_UUID::ByteSize ( )
inlinestatic

◆ from_string()

bool hops::MHO_UUID::from_string ( const std::string &  uuid_str)
inline
  • Convert a formatted string into a UUID byte array and fill this object
    Returns
    update the uuid object from std::string containing the hexadecimal digits of the UUID.

◆ is_empty()

bool hops::MHO_UUID::is_empty ( ) const
inline

◆ operator!=()

bool hops::MHO_UUID::operator!= ( const MHO_UUID rhs) const
inline

◆ operator<()

bool hops::MHO_UUID::operator< ( const MHO_UUID rhs) const
inline

◆ operator=()

MHO_UUID& hops::MHO_UUID::operator= ( const MHO_UUID rhs)
inline

◆ operator==()

bool hops::MHO_UUID::operator== ( const MHO_UUID rhs) const
inline

◆ operator[]() [1/2]

uint8_t& hops::MHO_UUID::operator[] ( std::size_t  i)
inline

◆ operator[]() [2/2]

const uint8_t& hops::MHO_UUID::operator[] ( std::size_t  i) const
inline

◆ size()

uint64_t hops::MHO_UUID::size ( ) const
inline

Member Data Documentation

◆ fBytes

uint8_t hops::MHO_UUID::fBytes[MHO_UUID_LENGTH]
protected

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