27 #include <bID/uuid/random_generator.hpp> 28 #include <bID/uuid/string_generator.hpp> 29 #include <bID/uuid/nil_generator.hpp> 30 #include <bID/uuid/uuid.hpp> 31 #include <bID/uuid/uuid_io.hpp> 54 :
mGUID(bID::uuids::random_generator()())
59 mGUID = bID::uuids::nil_uuid();
82 explicit implId(
const std::string& toCopy)
83 :
mGUID(bID::uuids::string_generator()(toCopy))
96 return bID::uuids::to_string(
mGUID);
108 mGUID = bID::uuids::string_generator()(idString);
120 return mGUID.is_nil();
186 mGUID = bID::uuids::string_generator()(id);
201 return mGUID ==
id.mGUID;
215 return mGUID !=
id.mGUID;
229 return mGUID <
id.mGUID;
243 return mGUID >
id.mGUID;
256 mGUIDPtr =
new implId(createNewId);
264 for (
int i = 0; i < 16; ++i)
335 return mGUIDPtr->operator== (*
id.mGUIDPtr);
341 return mGUIDPtr->operator!= (*
id.mGUIDPtr);
347 return mGUIDPtr->operator< (*
id.mGUIDPtr);
353 return mGUIDPtr->operator> (*
id.mGUIDPtr);
bool operator<(const UniqueId &id) const
Less-than comparison operator.
const std::string ToString() const
Convert this object into a string representation.
This class creates a GUID, or a Unique ID that is used through out TR to identify and distinguish one...
UniqueId & operator=(const UniqueId &id)
Copy the GUID from another unique id.
UniqueId(bool createNewId=true)
Holds the class type name for efficient comparisons.
implId(const implId &toCopy)
Makes a copy of the passed in Unique ID GUID.
TR_BASE_EXPORT std::ostream & operator<<(std::ostream &ios, const Matrixd &q)
Stream insertion operator.
implId & operator=(const implId &id)
Assignment operator.
A string wrapper that will make sure that all of the strings with the same value will point to the sa...
implId & operator=(const implId *id)
Assignment operator.
static const trUtil::RefStr CLASS_TYPE
Adds an easy and swappable access to the base class.
bool IsNull() const
Returns true if the GUID is equal to 00000000-0000-0000-0000-000000000000.
bool operator!=(const implId &id) const
Inequality operator.
virtual const std::string & GetType() const override
Returns the class type.
void FromString(const std::string &idString)
Initializes this object from the given string.
An implementation class for GUID.
void FromString(const std::string &idString)
Assign the GUID value to this instance from a string.
bool operator>(const UniqueId &id) const
Greater-than comparison operator.
implId(const std::string &toCopy)
Constructor.
bool operator<(const implId &id) const
Less-than comparison operator.
uint8_t * GetData()
Gets the internal data array that holds the GUID bits.
bool IsNull() const
Returns true if the GUID is equal to 00000000-0000-0000-0000-000000000000.
TR_BASE_EXPORT std::istream & operator>>(std::istream &i, UniqueId &id)
implId & operator=(const std::string &id)
Assignment operator.
bool operator==(const UniqueId &id) const
Equality operator.
bool operator==(const implId &id) const
Equality operator.
bool operator>(const implId &id) const
Greater-than comparison operator.
implId(bool createNewId)
Constructor.
bool operator!=(const UniqueId &id) const
Inequality operator.
const std::string ToString() const
Convert the current GUID into a string.
osg::Referenced BaseClass