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.4 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. GLOBALID.H
  5. History:
  6. --*/
  7. #ifndef ESPUTIL_GLOBALID_H
  8. #define ESPUTIL_GLOBALID_H
  9. enum ObjectType
  10. {
  11. otNone,
  12. otFile,
  13. otResource,
  14. };
  15. ///////////////////////////////////////////////////////////////////////////////
  16. //
  17. // global id object, represents what fully qualifies any database item
  18. //
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  21. // as base for dll-interface class 'bar'
  22. class LTAPIENTRY CGlobalId: public CObject
  23. {
  24. public:
  25. //
  26. // ctor/dtor
  27. //
  28. NOTHROW CGlobalId();
  29. NOTHROW CGlobalId(const DBID &dbid, ObjectType otType);
  30. NOTHROW CGlobalId(const CGlobalId &id);
  31. NOTHROW ~CGlobalId();
  32. //
  33. // operators
  34. //
  35. NOTHROW int operator==(const CGlobalId &) const;
  36. NOTHROW int operator!=(const CGlobalId &) const;
  37. NOTHROW const CGlobalId & operator=(const CGlobalId &);
  38. NOTHROW const DBID & GetDBID() const;
  39. NOTHROW ObjectType GetObjType(void) const;
  40. protected:
  41. //
  42. // debug routines
  43. //
  44. virtual void AssertValid() const;
  45. //
  46. // data members
  47. //
  48. DBID m_dbid;
  49. ObjectType m_otObjType;
  50. DEBUGONLY(static CCounter m_UsageCounter);
  51. };
  52. #pragma warning(default: 4275)
  53. #if !defined(_DEBUG) || defined(IMPLEMENT)
  54. #include "globalid.inl"
  55. #endif
  56. #endif