VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
DtUUID Class Reference

UUID is a unique ID wrapper class.

Inheritance diagram for DtUUID:
Inheritance graph
[legend]

Public Member Functions

 DtUUID (DtUUIDOwner *=0)
 
 DtUUID (const DtUUID &, DtUUIDOwner *=0)
 
 DtUUID (const boost::uuids::uuid &, DtUUIDOwner *=0)
 
 DtUUID (const DtString &, DtUUIDOwner *=0, bool blockMarkingTextLookup=false)
 
 DtUUID (const std::string &, DtUUIDOwner *=0, bool blockMarkingTextLookup=false)
 
 DtUUID (const char *, DtUUIDOwner *=0, bool blockMarkingTextLookup=false)
 
 DtUUID (const unsigned char *data, size_t dataLength, DtUUIDOwner *=0)
 
DtUUIDoperator= (const DtUUID &orig)
 
DtUUIDoperator= (const boost::uuids::uuid &orig)
 
bool operator< (const DtUUID &rhs) const
 
bool operator> (const DtUUID &rhs) const
 
virtual ~DtUUID ()
 
const chardata () const
 
unsigned int dataSize () const
 
void setBuffer (const char *)
 
bool isBoostUUID () const
 
bool isVrfUUID () const
 
UUIDType uuidType () const
 
virtual void setUUID (const DtString &, bool blockMarkingTextLookup=false)
 
virtual const DtStringuuidString () const
 
virtual void setMarkingText (const DtString &)
 
virtual void setStringUUID (const DtString &)
 
virtual void generateUUID ()
 
virtual void clearUUID ()
 
bool operator== (const DtString &) const
 
bool operator== (const std::string &) const
 
bool operator== (const char *) const
 
bool operator== (const DtUUID &) const
 
bool operator== (const DtRwUUID &) const
 
bool operator!= (const DtUUID &rhs) const
 
bool operator!= (const DtString &rhs) const
 
bool operator!= (const DtRwUUID &rhs) const
 
virtual bool isValid () const
 
virtual bool isStringUUID () const
 
size_t hashValue () const
 
boost::uuids::uuid uuid () const
 
boost::uuids::uuid asBoostUUID () const
 
virtual DtString markingText () const
 
std::string string () const
 
virtual size_t calcHashValue () const
 
bool addedForUpgrade () const
 
void setAddedForUpgrade (bool b)
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 
virtual void init (void *userData)
 

Static Public Member Functions

static bool isVrfUUID (const DtString &)
 
static DtString uuidMarking ()
 
static DtUUID makeStringUUID (const DtString &)
 
static const DtUUIDnullUUID ()
 
static
DtObjectIdentificationResolver
objectIdentificationResolver ()
 
static bool isValidBoostUUIDString (const DtString &str)
 

Protected Types

enum  UUIDType { NOTSET = 0, BOOST = 1, STRING = 2, UUIDSTRING = 3 }
 

Protected Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
virtual void convertStringToData (const std::string &)
 
virtual boost::uuids::uuid convertToBoostUUID (const DtString &)
 
virtual boost::uuids::uuid convertStringToBoostUUID (const DtString &, bool blockMarkingTextLookup=false)
 
virtual const charconvertStringToStringUUID (const char *t) const
 

Protected Attributes

char myData [36]
 
DtString myUUIDString
 
DtString myMarkingText
 
DtUUIDOwnermyOwner
 
size_t myHashValue
 
bool myAddedForUpgrade
 

Static Protected Attributes

static
DtObjectIdentificationResolver 
theObjectIdentificationResolver
 

Friends

class boost::serialization::access
 
DtString objectType () const
 
DtString serialize ()
 
bool deserialize (const DtString &data)
 
static DtAsciiSerializablecreator ()
 

Member Enumeration Documentation

enum DtUUID::UUIDType
protected
Enumerator
NOTSET 
BOOST 
STRING 
UUIDSTRING 

Constructor & Destructor Documentation

DtUUID::DtUUID ( DtUUIDOwner = 0)

CTOR. In order to create a UUID call generateUUID.

DtUUID::DtUUID ( const DtUUID ,
DtUUIDOwner = 0 
)
DtUUID::DtUUID ( const boost::uuids::uuid &  ,
DtUUIDOwner = 0 
)
DtUUID::DtUUID ( const DtString ,
DtUUIDOwner = 0,
bool  blockMarkingTextLookup = false 
)
explicit

If string is a UUID (VRF_UUID:) then sets a valid UUID from the string, else will have an invalid UUID. Check isValid after the constructor is called to see if it is a valid UUID. If blockMarkingTextLookup is true, if the string given is an object marking text (not UUID) blocks the lookup to map the marking text to the UUID and keeps the uuid as the object marking text.

DtUUID::DtUUID ( const std::string &  ,
DtUUIDOwner = 0,
bool  blockMarkingTextLookup = false 
)
explicit
DtUUID::DtUUID ( const char ,
DtUUIDOwner = 0,
bool  blockMarkingTextLookup = false 
)
explicit
DtUUID::DtUUID ( const unsigned char data,
size_t  dataLength,
DtUUIDOwner = 0 
)
explicit

Takes the given data and assumes a UUID valid format and copies to internal buffer.

virtual DtUUID::~DtUUID ( )
virtual

Member Function Documentation

DtUUID& DtUUID::operator= ( const DtUUID orig)
DtUUID& DtUUID::operator= ( const boost::uuids::uuid &  orig)
bool DtUUID::operator< ( const DtUUID rhs) const
bool DtUUID::operator> ( const DtUUID rhs) const
const char* DtUUID::data ( ) const
inline

Not this also contains the special marker – the actual UUID starts at byte 1.

unsigned int DtUUID::dataSize ( ) const
inline
void DtUUID::setBuffer ( const char )
static bool DtUUID::isVrfUUID ( const DtString )
static

Returns true if the UUID contains the special VRF uuid marking.

bool DtUUID::isBoostUUID ( ) const
bool DtUUID::isVrfUUID ( ) const
UUIDType DtUUID::uuidType ( ) const
virtual void DtUUID::setUUID ( const DtString ,
bool  blockMarkingTextLookup = false 
)
virtual

Sets/Gets the UUID.

virtual const DtString& DtUUID::uuidString ( ) const
virtual
static DtString DtUUID::uuidMarking ( )
static

The special marking text used to identify this as a VRF UUID. Attach this to any string to make this a string UUID. For example,.

setUUID(DtUUID::uuidMarking() + "MyUUID");

static DtUUID DtUUID::makeStringUUID ( const DtString )
static

Make the string a UUID marking text. Basically adds uuidMarking() to the given string.

virtual void DtUUID::setMarkingText ( const DtString )
virtual

Set this marking text to be the object marking text. This will be used if there is no information in the global map.

virtual void DtUUID::setStringUUID ( const DtString )
virtual

Replaces whatever boost UUID has been created (or not) with a string UUID. If the VRF_UUID: is not present will be considered marking text. Use only if you need to specifically set a UUID that is not a boost UUID.

Referenced by makVrf::DtSelectionGroupManager::serialize().

virtual void DtUUID::generateUUID ( )
virtual

Generates a new UUID.

virtual void DtUUID::clearUUID ( )
virtual

Clears out the UUID and restores to starting state.

bool DtUUID::operator== ( const DtString ) const
bool DtUUID::operator== ( const std::string &  ) const
bool DtUUID::operator== ( const char ) const
bool DtUUID::operator== ( const DtUUID ) const
bool DtUUID::operator== ( const DtRwUUID ) const
bool DtUUID::operator!= ( const DtUUID rhs) const
inline
bool DtUUID::operator!= ( const DtString rhs) const
inline
bool DtUUID::operator!= ( const DtRwUUID rhs) const
inline
virtual bool DtUUID::isValid ( ) const
virtual
virtual bool DtUUID::isStringUUID ( ) const
virtual
size_t DtUUID::hashValue ( ) const

If the hashValue is 0 and this is a valid UUID, this will throw a std::runtime_exception.

Referenced by std::hash< DtUUID >::operator()().

boost::uuids::uuid DtUUID::uuid ( ) const
inline
boost::uuids::uuid DtUUID::asBoostUUID ( ) const
static const DtUUID& DtUUID::nullUUID ( )
static
virtual DtString DtUUID::markingText ( ) const
virtual

Returns the markingText that is associated with this UUID.

std::string DtUUID::string ( ) const

Will return the uuidString() without the special VRF marking.

static DtObjectIdentificationResolver& DtUUID::objectIdentificationResolver ( )
static

Returns the class that can be used to resovle UUID to marking text and entity identifier mappings.

DtString DtUUID::objectType ( ) const
virtual

Inherited from DtAsciiSerializable.

Returns "DtLocation3D"

Implements DtAsciiSerializable.

DtString DtUUID::serialize ( )
virtual

Returns a string serialized version of this class.

Implements DtAsciiSerializable.

bool DtUUID::deserialize ( const DtString data)
virtual

Returns true if it could fill its members with the data contained in the string. False otherwise.

Implements DtAsciiSerializable.

static DtAsciiSerializable* DtUUID::creator ( )
static

Returns a new object of this type with default values.

static bool DtUUID::isValidBoostUUIDString ( const DtString str)
static
virtual size_t DtUUID::calcHashValue ( ) const
virtual
bool DtUUID::addedForUpgrade ( ) const
inline
void DtUUID::setAddedForUpgrade ( bool  b)
inline
template<class Archive >
void DtUUID::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprotected

When the class Archive corresponds to an output archive, the & operator is defined similar to <<. Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.

virtual void DtUUID::convertStringToData ( const std::string &  )
protectedvirtual
virtual boost::uuids::uuid DtUUID::convertToBoostUUID ( const DtString )
protectedvirtual
virtual boost::uuids::uuid DtUUID::convertStringToBoostUUID ( const DtString ,
bool  blockMarkingTextLookup = false 
)
protectedvirtual
virtual const char* DtUUID::convertStringToStringUUID ( const char t) const
protectedvirtual

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Member Data Documentation

char DtUUID::myData[36]
protected

The UUID has been changed to be a memory blob of fixed size. The blob's format is the first char is the type, and the rest is the data.

DtString DtUUID::myUUIDString
mutableprotected

If the assignment is not a valid boost UUID then the string UUID is what is used.

DtString DtUUID::myMarkingText
protected
DtUUIDOwner* DtUUID::myOwner
protected
DtObjectIdentificationResolver DtUUID::theObjectIdentificationResolver
staticprotected
size_t DtUUID::myHashValue
protected
bool DtUUID::myAddedForUpgrade
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)