Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Celartem::Guid Struct Reference

#include <cel_guid.h>

Public Member Functions

 Guid (bool inGenerateNewGuid=false)
 
 Guid (const char *inString)
 
 Guid (const String &inString)
 
 Guid (const Guid &inGuid)
 
Guidoperator= (const char *inString)
 
Guidoperator= (const String &inString)
 
Guidoperator= (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 GuidgetNullGuid ()
 

Public Attributes

guid_t guid
 

Detailed Description

This struct provides the functions to deal with GUID/UUID.

Constructor & Destructor Documentation

Celartem::Guid::Guid ( bool  inGenerateNewGuid = false)

Create a new Guid instance.

Parameters
inGenerateNewGuidIf 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.

Parameters
inStringA 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.

Parameters
inStringA string that contains the GUID notation.
Celartem::Guid::Guid ( const Guid inGuid)

Copies the specified instance to create a new Guid instance.

Parameters
inGuidA Guid instance to be duplicated.

Member Function Documentation

void Celartem::Guid::deserialize ( Stream inStream,
size_t  inLevel,
Endian  inEndian 
)

This method is just a helper function to deal with SerializableData template. For more information, see SerializableData.

See Also
SerializableData,Serializable, DataStore
void Celartem::Guid::duplicate ( const Guid inGuid)

Duplicates the specified GUID.

Parameters
inGuidA 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.

Parameters
inStringA 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.

Parameters
inStringA string that contains the GUID notation.
void Celartem::Guid::generateNew ( )

Generates a new GUID number.

static const Guid& Celartem::Guid::getNullGuid ( )
static

Gets the reference to null GUID.

Returns
Reference to the static shared null GUID.
bool Celartem::Guid::isValid ( ) const

Verifies whether the GUID is not null GUID or not.

Returns
true if the GUID is not null GUID, otherwise false.
bool Celartem::Guid::operator!= ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
true if the 2 GUIDs are not same value, otherwise false.
bool Celartem::Guid::operator< ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
true if this GUID is less than inGuid, otherwise false.
bool Celartem::Guid::operator<= ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
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.

Parameters
inStringA string that contains the GUID notation.
Guid& Celartem::Guid::operator= ( 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.

Parameters
inStringA string that contains the GUID notation.
Guid& Celartem::Guid::operator= ( const Guid inGuid)

Use the specified instance to create a new Guid instance.

Parameters
inGuidA Guid instance to be duplicated.
bool Celartem::Guid::operator== ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
true if the 2 GUIDs are same value, otherwise false.
bool Celartem::Guid::operator> ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
true if this GUID is larger than inGuid, otherwise false.
bool Celartem::Guid::operator>= ( const Guid inGuid) const

Compares 2 Guid instances.

Parameters
inGuidGuid instance to compare with.
Returns
true if this GUID is no less than inGuid, otherwise false.
void Celartem::Guid::serialize ( Stream inStream,
size_t  inLevel,
Endian  inEndian 
) const

This method is just a helper function to deal with SerializableData template. For more information, see SerializableData.

See Also
SerializableData,Serializable, DataStore
String Celartem::Guid::toString ( ) const

Converts into string. The string syntax is like "{620FFED8-5DAA-487a-9398-4DE4DC37D825}" .

Returns
A string represents the GUID.
void Celartem::Guid::zeroClear ( )

Sets the GUID to null GUID.

Member Data Documentation

guid_t Celartem::Guid::guid

Raw GUID, it can be accessed publicly.


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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:06.
Cuminas Logo