Nebula
Loading...
Searching...
No Matches
Posix::PosixGuid Class Reference

#include <posixguid.h>

Detailed Description

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
 

Constructor & Destructor Documentation

◆ PosixGuid() [1/3]

Posix::PosixGuid::PosixGuid ( )
inline

constructor

◆ PosixGuid() [2/3]

Posix::PosixGuid::PosixGuid ( const PosixGuid & rhs)
inline

copy constructor

◆ PosixGuid() [3/3]

Posix::PosixGuid::PosixGuid ( const unsigned char * ptr,
SizeT size )
inline

construct from raw binary data as returned by AsBinary()

Member Function Documentation

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

◆ AsString()

String Posix::PosixGuid::AsString ( ) const

get as string

◆ FromBinary()

PosixGuid Posix::PosixGuid::FromBinary ( const unsigned char * ptr,
SizeT numBytes )
static

construct from binary representation

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

◆ FromString()

PosixGuid Posix::PosixGuid::FromString ( const Util::String & str)
static

construct from string representation

◆ Generate()

void Posix::PosixGuid::Generate ( )

generate a new guid

◆ HashCode()

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.

◆ IsValid()

bool Posix::PosixGuid::IsValid ( ) const

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

◆ operator!=()

bool Posix::PosixGuid::operator!= ( const PosixGuid & rhs) const

inequlality operator

◆ operator<()

bool Posix::PosixGuid::operator< ( const PosixGuid & rhs) const

less-then operator

◆ operator<=()

bool Posix::PosixGuid::operator<= ( const PosixGuid & rhs) const

less-or-equal operator

◆ operator=() [1/2]

void Posix::PosixGuid::operator= ( const PosixGuid & rhs)

assignement operator

◆ operator=() [2/2]

void Posix::PosixGuid::operator= ( const Util::String & rhs)

assignment operator from string

◆ operator==()

bool Posix::PosixGuid::operator== ( const PosixGuid & rhs) const

equality operator

◆ operator>()

bool Posix::PosixGuid::operator> ( const PosixGuid & rhs) const

greater-then operator

◆ operator>=()

bool Posix::PosixGuid::operator>= ( const PosixGuid & rhs) const

greater-or-equal operator

Member Data Documentation

◆ uuid

uuid_t Posix::PosixGuid::uuid
private

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