Web Analytics Made Easy - Statcounter
Skip to content

Class SBCContainerUUID#

ClassList > SBCContainerUUID

This class describes a universally unique identifier (UUID). More...

  • #include "SBCContainerUUID.hpp"

Public Attributes#

Type Name
std::array< uint8_t, 16 > data

Public Static Attributes#

Type Name
SBCContainerUUID invalid
An empty invalid UUID object (equal to SBCContainerUUID() )

Public Functions#

Type Name
SBCContainerUUID (const std::array< uint8_t, 16 > & data)
Constructs a UUID from internal data.
SBCContainerUUID (const std::string & uuid)
Constructs a UUID from a std::string.
SBCContainerUUID (const SBCContainerUUID & other)
Copy constructor.
SBCContainerUUID (SBCContainerUUID && other) noexcept
Move constructor.
SBCContainerUUID ()
Constructs an invalid UUID.
bool isValid () const
Returns true if and only if the UUID is valid.
bool operator!= (const SBCContainerUUID & other) const
Inequality operator.
std::string operator() () const
Returns the UUID in string format.
SBCContainerUUID & operator++ ()
Prefix increment operator.
SBCContainerUUID operator++ (int)
Postfix increment operator.
SBCContainerUUID & operator-- ()
Prefix decrement operator.
SBCContainerUUID operator-- (int)
Postfix decrement operator.
bool operator< (const SBCContainerUUID & other) const
Lexicographic comparison with another UUID.
SBCContainerUUID & operator= (const SBCContainerUUID & other)
Copy assignment operator.
SBCContainerUUID & operator= (SBCContainerUUID && other)
Move assignment operator.
bool operator== (const SBCContainerUUID & other) const
Equality operator.
virtual ~SBCContainerUUID ()
Destructs the UUID.

Detailed Description#

SBCContainerUUID objects can hold Universally Unique IDs (UUIDs), which are used to identify classes and SAMSON Extensions. In many cases, UUIDs are automatically generated thanks to the SAMSON Extension Generator.

UUIDs may be used e.g. to retrieve class proxies:

SBCClassProxy*  classProxy = nullptr;
std::string     className("ClassName");
std::string     elementName("ElementName");
SBUUID          elementUUID("0CE16BE8-8AA1-75C4-31A8-B3FA1CE93A94");

// retrieve a class proxy

classProxy = SAMSON::getProxy(className, elementName, elementUUID);

When necessary, SBDTypeRandom can be used to generate UUIDs :

SBRandom    randomGenerator;
SBUUID      randomUUID = randomGenerator.randUUID();

Short name: SBUUID

See also: Identifiers, SAMSON Extension Generator, SBDTypeRandom

Public Attributes Documentation#

variable data#

std::array<uint8_t, 16> SBCContainerUUID::data;

Public Static Attributes Documentation#

variable invalid#

An empty invalid UUID object (equal to SBCContainerUUID() )

SBCContainerUUID SBCContainerUUID::invalid;


Public Functions Documentation#

function SBCContainerUUID [1/5]#

Constructs a UUID from internal data.

SBCContainerUUID::SBCContainerUUID (
    const std::array< uint8_t, 16 > & data
) 


function SBCContainerUUID [2/5]#

Constructs a UUID from a std::string.

SBCContainerUUID::SBCContainerUUID (
    const std::string & uuid
) 


function SBCContainerUUID [3/5]#

Copy constructor.

SBCContainerUUID::SBCContainerUUID (
    const SBCContainerUUID & other
) 


function SBCContainerUUID [4/5]#

Move constructor.

SBCContainerUUID::SBCContainerUUID (
    SBCContainerUUID && other
) noexcept


function SBCContainerUUID [5/5]#

Constructs an invalid UUID.

SBCContainerUUID::SBCContainerUUID () 


function isValid#

Returns true if and only if the UUID is valid.

bool SBCContainerUUID::isValid () const


function operator!=#

Inequality operator.

bool SBCContainerUUID::operator!= (
    const SBCContainerUUID & other
) const


function operator()#

Returns the UUID in string format.

std::string SBCContainerUUID::operator() () const


function operator++#

Prefix increment operator.

SBCContainerUUID & SBCContainerUUID::operator++ () 


function operator++#

Postfix increment operator.

SBCContainerUUID SBCContainerUUID::operator++ (
    int
) 


function operator--#

Prefix decrement operator.

SBCContainerUUID & SBCContainerUUID::operator-- () 


function operator--#

Postfix decrement operator.

SBCContainerUUID SBCContainerUUID::operator-- (
    int
) 


function operator<#

Lexicographic comparison with another UUID.

bool SBCContainerUUID::operator< (
    const SBCContainerUUID & other
) const


function operator=#

Copy assignment operator.

SBCContainerUUID & SBCContainerUUID::operator= (
    const SBCContainerUUID & other
) 


function operator=#

Move assignment operator.

SBCContainerUUID & SBCContainerUUID::operator= (
    SBCContainerUUID && other
) 


function operator==#

Equality operator.

bool SBCContainerUUID::operator== (
    const SBCContainerUUID & other
) const


function ~SBCContainerUUID#

Destructs the UUID.

virtual SBCContainerUUID::~SBCContainerUUID ()