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.

75 lines
1.7 KiB

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