X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..49a63afbad7646668df343d29edd88458bc7e0a9:/include/wx/msw/ole/uuid.h diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h index 5c97e4c8a9..1b31d7373c 100644 --- a/include/wx/msw/ole/uuid.h +++ b/include/wx/msw/ole/uuid.h @@ -1,12 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: ole/uuid.h +// Name: wx/msw/ole/uuid.h // Purpose: encapsulates an UUID with some added helper functions // Author: Vadim Zeitlin -// Modified by: +// Modified by: // Created: 11.07.97 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWidgets licence +// Licence: wxWindows licence // // Notes: you should link your project with RPCRT4.LIB! /////////////////////////////////////////////////////////////////////////////// @@ -14,10 +14,7 @@ #ifndef _WX_OLEUUID_H #define _WX_OLEUUID_H -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "uuid.h" -#endif -#include "wx/wxchar.h" +#include "wx/chartype.h" // ------------------------------------------------------------------ // UUID (Universally Unique IDentifier) definition // ------------------------------------------------------------------ @@ -25,7 +22,7 @@ // ----- taken from RPC.H #ifndef UUID_DEFINED // in some cases RPC.H will be already #ifdef __WIN32__ // included, so avoid redefinition - typedef struct + typedef struct { unsigned long Data1; unsigned short Data2; @@ -47,11 +44,11 @@ typedef unsigned char uchar; // ------------------------------------------------------------------ // uses RPC functions to create/convert Universally Unique Identifiers -class WXDLLEXPORT Uuid +class WXDLLIMPEXP_CORE Uuid { private: UUID m_uuid; - wxUChar *m_pszUuid; // this string is alloc'd and freed by RPC + wxUChar *m_pszUuid; // this string is alloc'd and freed by RPC wxChar *m_pszCForm; // this string is allocated in Set/Create void UuidToCForm(); @@ -73,10 +70,14 @@ public: // create a brand new UUID void Create(); - // set value of UUID + // set value of UUID bool Set(const wxChar *pc); // from a string, returns true if ok void Set(const UUID& uuid); // from another UUID (never fails) + // comparison operators + bool operator==(const Uuid& uuid) const; + bool operator!=(const Uuid& uuid) const { return !(*this == uuid); } + // accessors operator const UUID*() const { return &m_uuid; } operator const wxChar*() const { return (wxChar *)(m_pszUuid); }