Nebula
Loading...
Searching...
No Matches
OSX::OSXGuid Class Reference

#include <osxguid.h>

Detailed Description

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
 

Constructor & Destructor Documentation

◆ OSXGuid() [1/3]

OSX::OSXGuid::OSXGuid ( )
inline

constructor

◆ OSXGuid() [2/3]

OSX::OSXGuid::OSXGuid ( const OSXGuid & rhs)
inline

copy constructor

◆ OSXGuid() [3/3]

OSX::OSXGuid::OSXGuid ( const unsigned char * ptr,
SizeT size )
inline

construct from raw binary data as returned by AsBinary()

Member Function Documentation

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

◆ AsString()

String OSX::OSXGuid::AsString ( ) const

get as string

◆ BinarySize()

SizeT OSX::OSXGuid::BinarySize ( )
inlinestatic

return the size of the binary representation in bytes

◆ FromBinary()

OSXGuid OSX::OSXGuid::FromBinary ( const unsigned char * ptr,
SizeT numBytes )
static

construct from binary representation

Constructs the guid from binary data, as returned by the AsBinary().

◆ FromString()

OSXGuid OSX::OSXGuid::FromString ( const Util::String & str)
static

construct from string representation

◆ Generate()

void OSX::OSXGuid::Generate ( )

generate a new guid

◆ HashCode()

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

◆ IsValid()

bool OSX::OSXGuid::IsValid ( ) const

return true if the contained guid is valid (not NIL)

◆ operator delete()

__forceinline void OSX::OSXGuid::operator delete ( void * ptr)

override delete operator

◆ operator new()

__forceinline void * OSX::OSXGuid::operator new ( size_t s)

override new operator

◆ operator!=()

bool OSX::OSXGuid::operator!= ( const OSXGuid & rhs) const

inequlality operator

◆ operator<()

bool OSX::OSXGuid::operator< ( const OSXGuid & rhs) const

less-then operator

◆ operator<=()

bool OSX::OSXGuid::operator<= ( const OSXGuid & rhs) const

less-or-equal operator

◆ operator=() [1/2]

void OSX::OSXGuid::operator= ( const OSXGuid & rhs)

assignement operator

◆ operator=() [2/2]

void OSX::OSXGuid::operator= ( const Util::String & rhs)

assignment operator from string

◆ operator==()

bool OSX::OSXGuid::operator== ( const OSXGuid & rhs) const

equality operator

◆ operator>()

bool OSX::OSXGuid::operator> ( const OSXGuid & rhs) const

greater-then operator

◆ operator>=()

bool OSX::OSXGuid::operator>= ( const OSXGuid & rhs) const

greater-or-equal operator

Member Data Documentation

◆ uuid

uuid_t OSX::OSXGuid::uuid
private

The documentation for this class was generated from the following files: