AGX Dynamics 2.38.0.0
Loading...
Searching...
No Matches
agx::Uuid Class Reference

A UUID, or Universally unique identifier, is intended to uniquely identify information in a distributed environment without significant central coordination. More...

#include <Uuid.h>

Classes

struct  Data
 
struct  Less
 Sorting functor of an uuid. More...
 

Public Member Functions

 Uuid ()
 Constructor.
 
 Uuid (const agx::String &uuidString)
 Constructor, will construct a uuid based on the given Uuis formatted string.
 
agx::UInt8data ()
 
const agx::UInt8data () const
 
UInt32 hash () const
 
bool isNil () const
 If this method returns true, the str() method will return a string of zeros.
 
bool operator!= (const Uuid &rhs) const
 
bool operator< (const Uuid &rhs) const
 
bool operator== (const Uuid &rhs) const
 
bool operator> (const Uuid &rhs) const
 
agx::String str () const
 

Static Public Member Functions

static Uuid generateFromString (const agx::String &seedString)
 Generate a valid UUID string from a specified input string.
 
static size_t size ()
 

Protected Attributes

Data m_data
 

Detailed Description

A UUID, or Universally unique identifier, is intended to uniquely identify information in a distributed environment without significant central coordination.

It can be used to tag objects with very short lifetimes, or to reliably identify very persistent objects across a network. Generator of UUID values based on V4 http://en.wikipedia.org/wiki/Universally_unique_identifier

Definition at line 41 of file Uuid.h.

Constructor & Destructor Documentation

◆ Uuid() [1/2]

agx::Uuid::Uuid ( )

Constructor.

◆ Uuid() [2/2]

agx::Uuid::Uuid ( const agx::String uuidString)
explicit

Constructor, will construct a uuid based on the given Uuis formatted string.

Parameters
uuidString- THe string with a uuid value

Member Function Documentation

◆ data() [1/2]

agx::UInt8 * agx::Uuid::data ( )
Returns
pointer to the underlying storage of an uuid

◆ data() [2/2]

const agx::UInt8 * agx::Uuid::data ( ) const
Returns
a const pointer to the underlying storage of an uuid

Referenced by agx::operator>>().

◆ generateFromString()

static Uuid agx::Uuid::generateFromString ( const agx::String seedString)
static

Generate a valid UUID string from a specified input string.

The algorithm will use the specified string as a seed to generate an Uuid in the standard form. There is no guarantee that the Uuid is truly unique.

Parameters
seedString- A string used as a seed to create a unique identifier
Returns
an Uuid based on the input string

◆ hash()

UInt32 agx::Uuid::hash ( ) const

Definition at line 213 of file Uuid.h.

References agx::Uuid::Data::ab, agx::Uuid::Data::cd, agx::hash(), and m_data.

◆ isNil()

bool agx::Uuid::isNil ( ) const
inline

If this method returns true, the str() method will return a string of zeros.

Returns
true if this uuid has not been initialized to a value.

Definition at line 84 of file Uuid.h.

◆ operator!=()

bool agx::Uuid::operator!= ( const Uuid rhs) const
inline

Definition at line 59 of file Uuid.h.

References agx::Uuid::Data::ab, agx::Uuid::Data::cd, and m_data.

◆ operator<()

bool agx::Uuid::operator< ( const Uuid rhs) const
inline

Definition at line 64 of file Uuid.h.

References agx::Uuid::Data::ab, agx::Uuid::Data::cd, and m_data.

◆ operator==()

bool agx::Uuid::operator== ( const Uuid rhs) const
inline

Definition at line 54 of file Uuid.h.

References agx::Uuid::Data::ab, agx::Uuid::Data::cd, and m_data.

◆ operator>()

bool agx::Uuid::operator> ( const Uuid rhs) const
inline

Definition at line 72 of file Uuid.h.

References agx::Uuid::Data::ab, agx::Uuid::Data::cd, and m_data.

◆ size()

static size_t agx::Uuid::size ( )
inlinestatic
Returns
the binary storage size of a uuid

Definition at line 90 of file Uuid.h.

Referenced by agx::operator>>().

◆ str()

agx::String agx::Uuid::str ( ) const
Returns
the Uuid in string format

References agx::hash().

Member Data Documentation

◆ m_data

Data agx::Uuid::m_data
protected

Definition at line 141 of file Uuid.h.

Referenced by hash(), operator!=(), operator<(), operator==(), and operator>().


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