Nebula
|
#include <posixguid.h>
Posix implementation of the Util::Guid class.
GUIDs can be compared and provide a hash code, so they can be used as keys in most collections.
(C) 2006 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
Public Member Functions | |
PosixGuid () | |
constructor | |
PosixGuid (const PosixGuid &rhs) | |
copy constructor | |
PosixGuid (const unsigned char *ptr, SizeT size) | |
construct from raw binary data as returned by AsBinary() | |
void | operator= (const PosixGuid &rhs) |
assignement operator | |
void | operator= (const Util::String &rhs) |
assignment operator from string | |
bool | operator== (const PosixGuid &rhs) const |
equality operator | |
bool | operator!= (const PosixGuid &rhs) const |
inequlality operator | |
bool | operator< (const PosixGuid &rhs) const |
less-then operator | |
bool | operator<= (const PosixGuid &rhs) const |
less-or-equal operator | |
bool | operator> (const PosixGuid &rhs) const |
greater-then operator | |
bool | operator>= (const PosixGuid &rhs) const |
greater-or-equal operator | |
bool | IsValid () const |
return true if the contained guid is valid (not NIL) | |
void | Generate () |
generate a new guid | |
Util::String | AsString () const |
get as string | |
SizeT | AsBinary (const unsigned char *&outPtr) const |
get pointer to binary data | |
IndexT | HashCode () const |
get a hash code (compatible with Util::HashTable) | |
Static Public Member Functions | |
static PosixGuid | FromString (const Util::String &str) |
construct from string representation | |
static PosixGuid | FromBinary (const unsigned char *ptr, SizeT numBytes) |
construct from binary representation | |
Private Attributes | |
uuid_t | uuid |
|
inline |
constructor
|
inline |
copy constructor
|
inline |
construct from raw binary data as returned by AsBinary()
SizeT Posix::PosixGuid::AsBinary | ( | const unsigned char *& | outPtr | ) | const |
get pointer to binary data
This method allows read access to the raw binary data of the uuid.
It returns the number of bytes in the buffer, and a pointer to the data.
String Posix::PosixGuid::AsString | ( | ) | const |
get as string
construct from binary representation
Constructs the guid from binary data, as returned by the AsBinary().
|
static |
construct from string representation
void Posix::PosixGuid::Generate | ( | ) |
generate a new guid
IndexT Posix::PosixGuid::HashCode | ( | ) | const |
get a hash code (compatible with Util::HashTable)
This method returns a hash code for the uuid, compatible with Util::HashTable.
bool Posix::PosixGuid::IsValid | ( | ) | const |
return true if the contained guid is valid (not NIL)
bool Posix::PosixGuid::operator!= | ( | const PosixGuid & | rhs | ) | const |
inequlality operator
bool Posix::PosixGuid::operator< | ( | const PosixGuid & | rhs | ) | const |
less-then operator
bool Posix::PosixGuid::operator<= | ( | const PosixGuid & | rhs | ) | const |
less-or-equal operator
void Posix::PosixGuid::operator= | ( | const PosixGuid & | rhs | ) |
assignement operator
void Posix::PosixGuid::operator= | ( | const Util::String & | rhs | ) |
assignment operator from string
bool Posix::PosixGuid::operator== | ( | const PosixGuid & | rhs | ) | const |
equality operator
bool Posix::PosixGuid::operator> | ( | const PosixGuid & | rhs | ) | const |
greater-then operator
bool Posix::PosixGuid::operator>= | ( | const PosixGuid & | rhs | ) | const |
greater-or-equal operator
|
private |