#include <cel_guid.h>
Public Member Functions | |
Guid (bool inGenerateNewGuid=false) | |
Guid (const char *inString) | |
Guid (const String &inString) | |
Guid (const Guid &inGuid) | |
Guid & | operator= (const char *inString) |
Guid & | operator= (const String &inString) |
Guid & | operator= (const Guid &inGuid) |
bool | operator== (const Guid &inGuid) const |
bool | operator!= (const Guid &inGuid) const |
bool | operator< (const Guid &inGuid) const |
bool | operator> (const Guid &inGuid) const |
bool | operator<= (const Guid &inGuid) const |
bool | operator>= (const Guid &inGuid) const |
bool | isValid () const |
String | toString () const |
void | fromString (const char *inString) |
void | fromString (const String &inString) |
void | generateNew () |
void | zeroClear () |
void | duplicate (const Guid &inGuid) |
void | serialize (Stream *inStream, size_t inLevel, Endian inEndian) const |
void | deserialize (Stream *inStream, size_t inLevel, Endian inEndian) |
Static Public Member Functions | |
static const Guid & | getNullGuid () |
Public Attributes | |
guid_t | guid |
This struct provides the functions to deal with GUID/UUID.
Celartem::Guid::Guid | ( | bool | inGenerateNewGuid = false | ) |
Create a new Guid instance.
inGenerateNewGuid | If true , this constructor creates a new valid GUID, otherwise (false ), it creates a null GUID. |
Celartem::Guid::Guid | ( | const char * | inString | ) |
Create a new Guid instance from string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
Celartem::Guid::Guid | ( | const String & | inString | ) |
Create a new Guid instance from string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
Celartem::Guid::Guid | ( | const Guid & | inGuid | ) |
Copies the specified instance to create a new Guid instance.
inGuid | A Guid instance to be duplicated. |
This method is just a helper function to deal with SerializableData template. For more information, see SerializableData.
void Celartem::Guid::duplicate | ( | const Guid & | inGuid | ) |
Duplicates the specified GUID.
inGuid | A GUID instance to be duplicated. |
void Celartem::Guid::fromString | ( | const char * | inString | ) |
Initializes Guid instance by the string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
void Celartem::Guid::fromString | ( | const String & | inString | ) |
Initializes Guid instance by the string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
void Celartem::Guid::generateNew | ( | ) |
Generates a new GUID number.
|
static |
Gets the reference to null GUID.
bool Celartem::Guid::isValid | ( | ) | const |
Verifies whether the GUID is not null GUID or not.
true
if the GUID is not null GUID, otherwise false
. bool Celartem::Guid::operator!= | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if the 2 GUIDs are not same value, otherwise false
. bool Celartem::Guid::operator< | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if this GUID is less than inGuid, otherwise false
. bool Celartem::Guid::operator<= | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if this GUID is no more than inGuid, otherwise false
. Guid& Celartem::Guid::operator= | ( | const char * | inString | ) |
Initializes Guid instance by the string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
Initializes Guid instance by the string. The requirements for the string is very simple; it should contain 32-digits of hexa-decimal number and any other characters are simply ignored.
inString | A string that contains the GUID notation. |
Use the specified instance to create a new Guid instance.
inGuid | A Guid instance to be duplicated. |
bool Celartem::Guid::operator== | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if the 2 GUIDs are same value, otherwise false
. bool Celartem::Guid::operator> | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if this GUID is larger than inGuid, otherwise false
. bool Celartem::Guid::operator>= | ( | const Guid & | inGuid | ) | const |
Compares 2 Guid instances.
inGuid | Guid instance to compare with. |
true
if this GUID is no less than inGuid, otherwise false
. This method is just a helper function to deal with SerializableData template. For more information, see SerializableData.
String Celartem::Guid::toString | ( | ) | const |
Converts into string. The string syntax is like "{620FFED8-5DAA-487a-9398-4DE4DC37D825}"
.
void Celartem::Guid::zeroClear | ( | ) |
Sets the GUID to null GUID.
guid_t Celartem::Guid::guid |
Raw GUID, it can be accessed publicly.