// Guid.h: interface for the CGuid class.
|
//
|
//////////////////////////////////////////////////////////////////////
|
|
#if !defined(AFX_GUID_H__D9421237_E27A_4AF6_8193_D20E0780CF75__INCLUDED_)
|
#define AFX_GUID_H__D9421237_E27A_4AF6_8193_D20E0780CF75__INCLUDED_
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
|
class AFX_EXT_CLASS CGuid
|
{
|
// Construction
|
public:
|
enum GuidStatus
|
{
|
valid = 0,
|
invalid = 1,
|
null = 2,
|
};
|
|
CGuid();
|
CGuid( const CGuid& ref );
|
CGuid( const GUID &guid );
|
CGuid( const CString strSrc );
|
CGuid( LPCWSTR lpszSrc );
|
|
const CGuid& operator=(const CGuid& guidSrc);
|
const CGuid& operator=(const GUID& guidSrc);
|
const CGuid& operator=(const CString strSrc);
|
const CGuid& operator=(LPCWSTR lpszSrc);
|
|
bool operator==(const CGuid& guid) const;
|
bool operator==(const GUID& guid) const;
|
bool operator!=(const CGuid& guid) const;
|
bool operator!=(const GUID& guid) const;
|
|
// ±È½Ï´óСÔËËã·û¿ÉÓÃÓÚmapÖеÄKEY
|
bool operator<(const CGuid& guid) const;
|
bool operator<(const GUID& guid) const;
|
bool operator>(const CGuid& guid) const;
|
bool operator>(const GUID& guid) const;
|
|
operator CString() const;
|
operator BSTR() const;
|
operator GUID() const;
|
|
// Attributers
|
public:
|
GUID m_guid;
|
GuidStatus m_status;
|
|
// Operations
|
public:
|
bool NewID();
|
CString GetString() const;
|
bool IsValid() const;
|
CString GetString1() const; // ת»¯Îª×Ö·û´® XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
bool FromString1( CString strSrc ); // ½« XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX ת»¯Îª GUID
|
};
|
|
#endif // !defined(AFX_GUID_H__D9421237_E27A_4AF6_8193_D20E0780CF75__INCLUDED_)
|