Public Member Functions | Static Public Member Functions | Public Attributes

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.


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

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

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.

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

Raw GUID, it can be accessed publicly.


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

This document is made with doxygen 1.7.1 at Sun Sep 5 2010 13:03:38.
Caminova Logo