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.

87 lines
1.8 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. LOCATION.H
  5. History:
  6. --*/
  7. #ifndef ESPUTIL_LOCATION_H
  8. #define ESPUTIL_LOCATION_H
  9. typedef CWnd *TabId;
  10. const TabId NullTabId = 0;
  11. enum View
  12. {
  13. vNone,
  14. vTransTab,
  15. vVisualEditor,
  16. vProjWindow
  17. };
  18. enum Component
  19. {
  20. cmpNone,
  21. cmpSource,
  22. cmpTarget,
  23. cmpSourceAndTarget
  24. };
  25. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  26. // as base for dll-interface class 'bar'
  27. class LTAPIENTRY CLocation : public CObject
  28. {
  29. public:
  30. NOTHROW CLocation();
  31. NOTHROW CLocation(const CLocation &);
  32. NOTHROW CLocation(const CGlobalId &, View, TabId = NullTabId, Component = cmpNone);
  33. NOTHROW CLocation(const DBID &, ObjectType, View, TabId = NullTabId, Component = cmpNone);
  34. #ifdef _DEBUG
  35. virtual void AssertValid(void) const;
  36. #endif
  37. NOTHROW const CLocation & operator=(const CLocation &);
  38. NOTHROW int operator==(const CLocation &) const;
  39. NOTHROW int operator!=(const CLocation &) const;
  40. NOTHROW const CGlobalId & GetGlobalId(void) const;
  41. NOTHROW TabId GetTabId(void) const;
  42. NOTHROW View GetView(void) const;
  43. NOTHROW Component GetComponent(void) const;
  44. NOTHROW BOOL IsVisual(void) const;
  45. NOTHROW void SetGlobalId(const CGlobalId &);
  46. NOTHROW void SetTabId(const TabId);
  47. NOTHROW void SetView(View);
  48. NOTHROW void SetComponent(Component);
  49. NOTHROW ~CLocation() {};
  50. private:
  51. NOTHROW void AssignFrom(const CLocation &);
  52. NOTHROW BOOL Compare(const CLocation &) const;
  53. CGlobalId m_giId;
  54. TabId m_TabId;
  55. View m_View;
  56. Component m_Component;
  57. };
  58. #pragma warning(default: 4275)
  59. const extern LTAPIENTRY CLocation g_locNull;
  60. #if !defined(_DEBUG) || defined(IMPLEMENT)
  61. #include "location.inl"
  62. #endif
  63. #endif