Source code of Windows XP (NT5)
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.

70 lines
1.2 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: dbid.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef DBID_H
  11. #define DBID_H
  12. //
  13. // represents a database id
  14. //
  15. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  16. // as base for dll-interface class 'bar'
  17. class LTAPIENTRY DBID : public CObject
  18. {
  19. public:
  20. //
  21. // ctors
  22. //
  23. DBID();
  24. DBID(const DBID& id);
  25. DBID(long l);
  26. ~DBID();
  27. //
  28. // debug methods
  29. //
  30. void AssertValid() const;
  31. //
  32. // 'get like' methods
  33. //
  34. BOOL NOTHROW IsNull() const;
  35. NOTHROW operator long () const;
  36. int NOTHROW operator==(const DBID &) const;
  37. int NOTHROW operator!=(const DBID &) const;
  38. //
  39. // 'put like' methods
  40. //
  41. void NOTHROW operator=(const DBID&);
  42. void NOTHROW Set(long);
  43. void NOTHROW Clear();
  44. protected:
  45. long m_l;
  46. private:
  47. DEBUGONLY(static CCounter m_UsageCounter);
  48. };
  49. #pragma warning(default: 4275)
  50. typedef CArray<DBID, DBID &> CDBIDArray;
  51. #if !defined(_DEBUG) || defined(IMPLEMENT)
  52. #include "dbid.inl"
  53. #endif
  54. const extern LTAPIENTRY DBID g_NullDBID;
  55. #endif // DBID_H