SBCContainerUUID Class Reference

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

Constructors and destructors

 SBCContainerUUID (const std::string &u)
 Constructs a UUID from a std::string.
 SBCContainerUUID (const SBCContainerUUID &u)
 Copy constructor.
 SBCContainerUUID (SBCContainerUUID &&u)
 Move constructor.
 SBCContainerUUID ()
 Constructs an invalid UUID.
virtual ~SBCContainerUUID ()
 Destructs the UUID.


SBCContainerUUIDoperator= (const SBCContainerUUID &u)
 Copy assignment operator.
SBCContainerUUIDoperator= (SBCContainerUUID &&u)
 Move assignment operator.
bool operator== (const SBCContainerUUID &u) const
 Equality operator.
bool operator!= (const SBCContainerUUID &u) const
 Non-equality operator.
bool operator< (const SBCContainerUUID &u) const
 Lexicographic comparison with another UUID.
std::string operator() () const
 Returns the UUID in string format.
SBCContainerUUIDoperator++ ()
 Prefix increment operator.
SBCContainerUUIDoperator++ (int)
 Postfix increment operator.


bool isValid () const
 Returns true if and only if the UUID is valid.

Detailed Description

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

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

SBCClassProxy* classProxy = 0;
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, SBRandom can be used to generate UUIDs :

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

Short name: SBUUID

See also
Generating a SAMSON Extension