Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cGuid Class Reference

#include <cGuid.h>

Inheritance diagram for GrayLib::cGuid:
_GUID

Public Member Functions

 cGuid ()
 
 cGuid (FOURCC fcc)
 
 cGuid (const GUID &rGuid)
 
 cGuid (const GUID *pGuid)
 
 cGuid (const char *pszGUID)
 
HRESULT InitNewGuid ()
 
void put_Guid (const GUID &guid)
 
void Clear ()
 
GUIDref_GuidPtr ()
 
const GUIDget_GuidPtr () const
 
bool isNull () const
 
bool IsEqual (const GUID &guid) const
 
COMPARE_t Compare (const GUID &guid) const
 
bool isFourCC () const
 
HRESULT put_FourCC (FOURCC fcc)
 
FOURCC get_FourCC () const
 
HRESULT put_StringW (const wchar_t *pszVal)
 
HRESULT put_StringA (const char *pszVal)
 
cStringW get_StringW () const
 
cStringA get_StringA () const
 
cString get_String () const
 
 UNITTEST2_PREDEF (cGuid)
 
- Public Member Functions inherited from _GUID
bool operator== (const _GUID &other) const
 

Static Public Attributes

static const GUID k_NULL = { 0 }
 like _WIN32 GUID_NULL IID_NULL CLSID_NULL More...
 
static const GUID k_FourCC = { 0x0, 0x0, 0x0010, { 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 } }
 GUID header for FourCC codes. More...
 

Additional Inherited Members

- Public Attributes inherited from _GUID
UINT32 Data1
 
WORD Data2
 
WORD Data3
 
BYTE Data4 [8]
 

Detailed Description

GUID = 16 bytes long = 128 bits = globally unique id same as uuidof(), uuid, CLSID same size as SQLGUID and IPv6 address like the .NET System.Guid class e.g. IID_IUnknown

Constructor & Destructor Documentation

◆ cGuid() [1/5]

GrayLib::cGuid::cGuid ( )

Null

◆ cGuid() [2/5]

GrayLib::cGuid::cGuid ( FOURCC  fcc)

◆ cGuid() [3/5]

GrayLib::cGuid::cGuid ( const GUID rGuid)

◆ cGuid() [4/5]

GrayLib::cGuid::cGuid ( const GUID pGuid)

◆ cGuid() [5/5]

GrayLib::cGuid::cGuid ( const char *  pszGUID)

Member Function Documentation

◆ Clear()

void GrayLib::cGuid::Clear ( )

Null

◆ Compare()

COMPARE_t GrayLib::cGuid::Compare ( const GUID guid) const

◆ get_FourCC()

FOURCC GrayLib::cGuid::get_FourCC ( ) const

◆ get_GuidPtr()

const GUID* GrayLib::cGuid::get_GuidPtr ( ) const
inline

◆ get_String()

cString GrayLib::cGuid::get_String ( ) const
inline

◆ get_StringA()

cStringA GrayLib::cGuid::get_StringA ( ) const

Return a string in format "{00000615-0000-0010-8000-00AA006D2EA4}"

◆ get_StringW()

cStringW GrayLib::cGuid::get_StringW ( ) const

Return a string in format "{00000615-0000-0010-8000-00AA006D2EA4}"

◆ InitNewGuid()

HRESULT GrayLib::cGuid::InitNewGuid ( )

Create a new very large random number. Base on my MAC address for sureness that it is unique ?

Note
linux doesn't mean UUID the way we think in uuid_create().

◆ IsEqual()

bool GrayLib::cGuid::IsEqual ( const GUID guid) const

◆ isFourCC()

bool GrayLib::cGuid::isFourCC ( ) const

◆ isNull()

bool GrayLib::cGuid::isNull ( ) const

uuid_is_null()

◆ put_FourCC()

HRESULT GrayLib::cGuid::put_FourCC ( FOURCC  fcc)

◆ put_Guid()

void GrayLib::cGuid::put_Guid ( const GUID guid)

◆ put_StringA()

HRESULT GrayLib::cGuid::put_StringA ( const char *  pszVal)

Parse a GUID from string in format "{00000615-0000-0010-8000-00AA006D2EA4}" Allow alternate formats ? or force braces and exact pattern ? like ParseIid -> _stscanf(Str, _T("%8x-%4x-%4x-%2x%2x-%2x%2x%2x%2x%2x%2x"), xxx ); like uuid_parse() and uuid_import() in linux

◆ put_StringW()

HRESULT GrayLib::cGuid::put_StringW ( const wchar_t *  pszVal)

Parse a string in format "{00000615-0000-0010-8000-00AA006D2EA4}" NOT "0C3E2E71-B93C-11d2-AAD0-006007654300"

Returns
E_INVALIDARG

◆ ref_GuidPtr()

GUID* GrayLib::cGuid::ref_GuidPtr ( )
inline

◆ UNITTEST2_PREDEF()

GrayLib::cGuid::UNITTEST2_PREDEF ( cGuid  )

Member Data Documentation

◆ k_FourCC

const GUID GrayLib::cGuid::k_FourCC = { 0x0, 0x0, 0x0010, { 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 } }
static

GUID header for FourCC codes.

◆ k_NULL

const GUID GrayLib::cGuid::k_NULL = { 0 }
static

like _WIN32 GUID_NULL IID_NULL CLSID_NULL


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