Nebula
|
#include <osxguid.h>
OSX implementation of the Util::Guid class.
(C) 2010 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
Public Member Functions | |
void * | operator new (size_t s) |
override new operator | |
void | operator delete (void *ptr) |
override delete operator | |
OSXGuid () | |
constructor | |
OSXGuid (const OSXGuid &rhs) | |
copy constructor | |
OSXGuid (const unsigned char *ptr, SizeT size) | |
construct from raw binary data as returned by AsBinary() | |
void | operator= (const OSXGuid &rhs) |
assignement operator | |
void | operator= (const Util::String &rhs) |
assignment operator from string | |
bool | operator== (const OSXGuid &rhs) const |
equality operator | |
bool | operator!= (const OSXGuid &rhs) const |
inequlality operator | |
bool | operator< (const OSXGuid &rhs) const |
less-then operator | |
bool | operator<= (const OSXGuid &rhs) const |
less-or-equal operator | |
bool | operator> (const OSXGuid &rhs) const |
greater-then operator | |
bool | operator>= (const OSXGuid &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 OSXGuid | FromString (const Util::String &str) |
construct from string representation | |
static OSXGuid | FromBinary (const unsigned char *ptr, SizeT numBytes) |
construct from binary representation | |
static SizeT | BinarySize () |
return the size of the binary representation in bytes | |
Private Attributes | |
uuid_t | uuid |
|
inline |
constructor
|
inline |
copy constructor
|
inline |
construct from raw binary data as returned by AsBinary()
SizeT OSX::OSXGuid::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 OSX::OSXGuid::AsString | ( | ) | const |
get as string
|
inlinestatic |
return the size of the binary representation in bytes
construct from binary representation
Constructs the guid from binary data, as returned by the AsBinary().
|
static |
construct from string representation
void OSX::OSXGuid::Generate | ( | ) |
generate a new guid
IndexT OSX::OSXGuid::HashCode | ( | ) | const |
get a hash code (compatible with Util::HashTable)
This method returns a hash code for the uuid, compatible with Util::HashTable.
This is simply copied from String::HashCode...
bool OSX::OSXGuid::IsValid | ( | ) | const |
return true if the contained guid is valid (not NIL)
__forceinline void OSX::OSXGuid::operator delete | ( | void * | ptr | ) |
override delete operator
__forceinline void * OSX::OSXGuid::operator new | ( | size_t | s | ) |
override new operator
bool OSX::OSXGuid::operator!= | ( | const OSXGuid & | rhs | ) | const |
inequlality operator
bool OSX::OSXGuid::operator< | ( | const OSXGuid & | rhs | ) | const |
less-then operator
bool OSX::OSXGuid::operator<= | ( | const OSXGuid & | rhs | ) | const |
less-or-equal operator
void OSX::OSXGuid::operator= | ( | const OSXGuid & | rhs | ) |
assignement operator
void OSX::OSXGuid::operator= | ( | const Util::String & | rhs | ) |
assignment operator from string
bool OSX::OSXGuid::operator== | ( | const OSXGuid & | rhs | ) | const |
equality operator
bool OSX::OSXGuid::operator> | ( | const OSXGuid & | rhs | ) | const |
greater-then operator
bool OSX::OSXGuid::operator>= | ( | const OSXGuid & | rhs | ) | const |
greater-or-equal operator
|
private |