Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cGuid.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cGuid_H
6 #define _INC_cGuid_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 
11 #include "cFourCC.h"
15 
16 namespace GrayLib
17 {
19 
20  class GRAYLIB_LINK cGuid : public GUID
21  {
28 
29  public:
30  static const GUID k_NULL;
31  static const GUID k_FourCC;
32 
33  public:
34  cGuid();
35  cGuid(FOURCC fcc);
36  cGuid(const GUID& rGuid);
37  cGuid(const GUID* pGuid);
38  cGuid(const char* pszGUID);
39 
40  HRESULT InitNewGuid();
41  void put_Guid(const GUID& guid);
42  void Clear();
43 
45  {
46  return static_cast<GUID*>(this);
47  }
48  const GUID* get_GuidPtr() const
49  {
50  return static_cast<const GUID*>(this);
51  }
52 
53  bool isNull() const;
54  bool IsEqual(const GUID& guid) const;
55  COMPARE_t Compare(const GUID& guid) const;
56 
57  bool isFourCC() const;
58  HRESULT put_FourCC(FOURCC fcc);
59  FOURCC get_FourCC() const;
60 
61  HRESULT put_StringW(const wchar_t* pszVal);
62  HRESULT put_StringA(const char* pszVal);
63  cStringW get_StringW() const;
64  cStringA get_StringA() const;
65 
67  {
68 #if USE_UNICODE
69  return get_StringW();
70 #else
71  return get_StringA();
72 #endif
73  }
74 
76  };
77 };
78 #endif
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
UINT32 FOURCC
32 bit code. Also defined in _MMSYSTEM_H
Definition: cFourCC.h:19
Definition: cGuid.h:21
static const GUID k_FourCC
GUID header for FourCC codes.
Definition: cGuid.h:31
const GUID * get_GuidPtr() const
Definition: cGuid.h:48
cString get_String() const
Definition: cGuid.h:66
GUID * ref_GuidPtr()
Definition: cGuid.h:44
static const GUID k_NULL
like _WIN32 GUID_NULL IID_NULL CLSID_NULL
Definition: cGuid.h:30
UNITTEST2_PREDEF(cGuid)
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
int COMPARE_t
result of compare. 0=same, 1=a>b, -1=a<b
Definition: cValT.h:17
Definition: IUnknown.h:34