Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.5 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. UNIQID.H
  5. History:
  6. --*/
  7. #ifndef UNIQID_H
  8. #define UNIQID_H
  9. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  10. // as base for dll-interface class 'bar'
  11. class LTAPIENTRY CLocUniqueId : public CObject
  12. {
  13. public:
  14. NOTHROW CLocUniqueId();
  15. void AssertValid(void) const;
  16. NOTHROW const DBID & GetParentId(void) const;
  17. NOTHROW const CLocTypeId & GetTypeId(void) const;
  18. NOTHROW const CLocResId & GetResId(void) const;
  19. NOTHROW DBID & GetParentId(void);
  20. NOTHROW CLocTypeId & GetTypeId(void);
  21. NOTHROW CLocResId & GetResId(void);
  22. void GetDisplayableUniqueId(CPascalString &) const;
  23. NOTHROW int operator==(const CLocUniqueId &) const;
  24. NOTHROW int operator!=(const CLocUniqueId &) const;
  25. const CLocUniqueId &operator=(const CLocUniqueId&);
  26. void SetParentId(const DBID&);
  27. NOTHROW void ClearId(void);
  28. NOTHROW BOOL IsNull();
  29. virtual ~CLocUniqueId();
  30. protected:
  31. //
  32. // Implementation functions.
  33. //
  34. NOTHROW BOOL IsEqualTo(const CLocUniqueId &) const;
  35. private:
  36. //
  37. // Prevents the default copy constructor from being called.
  38. //
  39. CLocUniqueId(const CLocUniqueId &);
  40. void Serialize(CArchive &ar);
  41. DBID m_dbid;
  42. CLocTypeId m_tid;
  43. CLocResId m_rid;
  44. DEBUGONLY(static CCounter m_DisplayCounter);
  45. };
  46. #pragma warning(default: 4275)
  47. #if !defined(_DEBUG) || defined(IMPLEMENT)
  48. #include "uniqid.inl"
  49. #endif
  50. #endif // UNIQID_H