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.

72 lines
1.1 KiB

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