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.

74 lines
1.6 KiB

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