Lunchbox  1.8.0
Public Member Functions | List of all members
lunchbox::UUID Class Reference

Provides a universally unique identifier. More...

#include <uuid.h>

+ Inheritance diagram for lunchbox::UUID:
+ Collaboration diagram for lunchbox::UUID:

Public Member Functions

 UUID (const bool generate=false)
 Construct a new universally unique identifier.
 UUID (const uint64_t high_, const uint64_t low_)
 Construct a new universally unique identifier.
 UUID (const uint128_t &from)
 Construct a new universally unique identifier from an unsigned 128 bit integer value.
UUIDoperator= (const int rhs)
 Assign an integer value.
UUIDoperator= (const std::string &from)
 Assign another UUID from a string representation.
bool isGenerated () const
- Public Member Functions inherited from lunchbox::uint128_t
 uint128_t (const uint64_t low_=0)
 Construct a new 128 bit integer with a default value.
 uint128_t (const uint64_t high_, const uint64_t low_)
 Construct a new 128 bit integer with default values.
 uint128_t (const std::string &string)
 Construct a new 128 bit integer from a string representation.
uint128_toperator= (const uint128_t &rhs)
 Assign another 128 bit value.
uint128_toperator= (const uint64_t rhs)
 Assign another 64 bit value.
bool operator== (const uint128_t &rhs) const
bool operator!= (const uint128_t &rhs) const
bool operator< (const uint128_t &rhs) const
bool operator> (const uint128_t &rhs) const
bool operator<= (const uint128_t &rhs) const
bool operator>= (const uint128_t &rhs) const
uint128_toperator++ ()
 Increment the value.
uint128_toperator-- ()
 Decrement the value.
uint128_toperator+= (const uint128_t &rhs)
 Add value and return the new value.
const uint64_t & low () const
const uint64_t & high () const
uint64_t & low ()
uint64_t & high ()
std::string getShortString () const
std::string getString () const
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize this object to a boost archive.

Detailed Description

Provides a universally unique identifier.

Not to be subclassed.

Definition at line 30 of file uuid.h.

Constructor & Destructor Documentation

lunchbox::UUID::UUID ( const bool  generate = false)
explicit

Construct a new universally unique identifier.

If generate is set to true, a new UUID is allocated. Otherwise the UUID is set to 0.

Version
1.0
lunchbox::UUID::UUID ( const uint64_t  high_,
const uint64_t  low_ 
)
inline

Construct a new universally unique identifier.

Version
1.0

Definition at line 46 of file uuid.h.

lunchbox::UUID::UUID ( const uint128_t from)
inline

Construct a new universally unique identifier from an unsigned 128 bit integer value.

Version
1.0

Definition at line 54 of file uuid.h.

Member Function Documentation

bool lunchbox::UUID::isGenerated ( ) const
inline
Returns
true if the UUID was generated.

Definition at line 65 of file uuid.h.

References lunchbox::uint128_t::high().

+ Here is the call graph for this function:

UUID& lunchbox::UUID::operator= ( const int  rhs)
inline

Assign an integer value.

Version
1.7.1

Reimplemented from lunchbox::uint128_t.

Definition at line 57 of file uuid.h.

UUID& lunchbox::UUID::operator= ( const std::string &  from)
inline

Assign another UUID from a string representation.

Version
1.0

Reimplemented from lunchbox::uint128_t.

Definition at line 61 of file uuid.h.


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