Nebula
Loading...
Searching...
No Matches
Win32::Win32Guid Class Reference

#include <win32guid.h>

Detailed Description

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

Public Member Functions

 Win32Guid ()
 constructor
 
 Win32Guid (const Win32Guid &rhs)
 copy constructor
 
 Win32Guid (const unsigned char *ptr, SizeT size)
 construct from raw binary data as returned by AsBinary()
 
void operator= (const Win32Guid &rhs)
 assignement operator
 
void operator= (const Util::String &rhs)
 assignment operator from string
 
bool operator== (const Win32Guid &rhs) const
 equality operator
 
bool operator!= (const Win32Guid &rhs) const
 inequlality operator
 
bool operator< (const Win32Guid &rhs) const
 less-then operator
 
bool operator<= (const Win32Guid &rhs) const
 less-or-equal operator
 
bool operator> (const Win32Guid &rhs) const
 greater-then operator
 
bool operator>= (const Win32Guid &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
 
uint32_t HashCode () const
 get a hash code (compatible with Util::HashTable)
 

Static Public Member Functions

static Win32Guid FromString (const Util::String &str)
 construct from string representation
 
static Win32Guid 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 uuid
 

Constructor & Destructor Documentation

◆ Win32Guid() [1/3]

Win32::Win32Guid::Win32Guid ( )
inline

constructor

◆ Win32Guid() [2/3]

Win32::Win32Guid::Win32Guid ( const Win32Guid & rhs)
inline

copy constructor

◆ Win32Guid() [3/3]

Win32::Win32Guid::Win32Guid ( const unsigned char * ptr,
SizeT size )
inline

construct from raw binary data as returned by AsBinary()

Member Function Documentation

◆ AsBinary()

SizeT Win32::Win32Guid::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 Win32::Win32Guid::AsString ( ) const

get as string

◆ BinarySize()

SizeT Win32::Win32Guid::BinarySize ( )
inlinestatic

return the size of the binary representation in bytes

◆ FromBinary()

Win32Guid Win32::Win32Guid::FromBinary ( const unsigned char * ptr,
SizeT numBytes )
static

construct from binary representation

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

◆ FromString()

Win32Guid Win32::Win32Guid::FromString ( const Util::String & str)
static

construct from string representation

◆ Generate()

void Win32::Win32Guid::Generate ( )

generate a new guid

◆ HashCode()

uint32_t Win32::Win32Guid::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 Win32::Win32Guid::IsValid ( ) const

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

◆ operator!=()

bool Win32::Win32Guid::operator!= ( const Win32Guid & rhs) const

inequlality operator

◆ operator<()

bool Win32::Win32Guid::operator< ( const Win32Guid & rhs) const

less-then operator

◆ operator<=()

bool Win32::Win32Guid::operator<= ( const Win32Guid & rhs) const

less-or-equal operator

◆ operator=() [1/2]

void Win32::Win32Guid::operator= ( const Util::String & rhs)

assignment operator from string

◆ operator=() [2/2]

void Win32::Win32Guid::operator= ( const Win32Guid & rhs)

assignement operator

◆ operator==()

bool Win32::Win32Guid::operator== ( const Win32Guid & rhs) const

equality operator

◆ operator>()

bool Win32::Win32Guid::operator> ( const Win32Guid & rhs) const

greater-then operator

◆ operator>=()

bool Win32::Win32Guid::operator>= ( const Win32Guid & rhs) const

greater-or-equal operator

Member Data Documentation

◆ uuid

UUID Win32::Win32Guid::uuid
private

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