Celartem::Guid Struct Reference

#include <cel_guid.h>

List of all members.

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.

Definition at line 27 of file cel_guid.h.


Constructor & Destructor Documentation

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

Create a new Guid instance.

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

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

Parameters:
inString A string that contains the GUID notation.

Celartem::Guid::Guid ( const Guid inGuid  ) 

Copies the specified instance to create a new Guid instance.

Parameters:
inGuid A Guid instance to be duplicated.


Member Function Documentation

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:
inString A 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:
inString A string that contains the GUID notation.

Guid& Celartem::Guid::operator= ( const Guid inGuid  ) 

Use the specified instance to create a new Guid instance.

Parameters:
inGuid A Guid instance to be duplicated.

bool Celartem::Guid::operator== ( const Guid inGuid  )  const

Compares 2 Guid instances.

Parameters:
inGuid Guid 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:
inGuid Guid 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:
inGuid Guid 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:
inGuid Guid 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:
inGuid Guid instance to compare with.
Returns:
true if this GUID is no more than inGuid, otherwise false.

bool Celartem::Guid::operator>= ( const Guid inGuid  )  const

Compares 2 Guid instances.

Parameters:
inGuid Guid instance to compare with.
Returns:
true if this GUID is no less than inGuid, otherwise false.

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.

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::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:
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.

Parameters:
inString A string that contains the GUID notation.

void Celartem::Guid::generateNew (  ) 

Generates a new GUID number.

void Celartem::Guid::zeroClear (  ) 

Sets the GUID to null GUID.

void Celartem::Guid::duplicate ( const Guid inGuid  ) 

Duplicates the specified GUID.

Parameters:
inGuid A GUID instance to be duplicated.

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

Gets the reference to null GUID.

Returns:
Reference to the static shared null GUID.

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

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


Member Data Documentation

guid_t Celartem::Guid::guid

Raw GUID, it can be accessed publicly.

Definition at line 32 of file cel_guid.h.


The documentation for this struct was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:17 2008.