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.

203 lines
2.2 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. LOCATION.INL
  5. History:
  6. --*/
  7. inline
  8. void
  9. CLocation::AssignFrom(
  10. const CLocation &other)
  11. {
  12. m_giId = other.m_giId;
  13. m_TabId = other.m_TabId;
  14. m_View = other.m_View;
  15. m_Component = other.m_Component;
  16. }
  17. inline
  18. BOOL
  19. CLocation::Compare(
  20. const CLocation &other)
  21. const
  22. {
  23. return m_giId == other.m_giId &&
  24. m_TabId == other.m_TabId &&
  25. m_View == other.m_View &&
  26. m_Component == other. m_Component;
  27. }
  28. inline
  29. CLocation::CLocation()
  30. {
  31. m_TabId = NullTabId;
  32. m_View = vNone;
  33. m_Component = cmpNone;
  34. }
  35. inline
  36. CLocation::CLocation(
  37. const CLocation &Other)
  38. {
  39. AssignFrom(Other);
  40. }
  41. inline
  42. CLocation::CLocation(
  43. const CGlobalId &giId,
  44. View view,
  45. TabId tabId,
  46. Component component)
  47. : m_giId(giId), m_TabId(tabId), m_View(view), m_Component(component)
  48. {}
  49. inline
  50. CLocation::CLocation(
  51. const DBID &dbid,
  52. ObjectType ot,
  53. View view,
  54. TabId tabId,
  55. Component component)
  56. : m_giId(dbid, ot), m_TabId(tabId), m_View(view), m_Component(component)
  57. {}
  58. inline
  59. const CLocation &
  60. CLocation::operator=(
  61. const CLocation &Other)
  62. {
  63. AssignFrom(Other);
  64. return *this;
  65. }
  66. inline
  67. int
  68. CLocation::operator==(
  69. const CLocation &Other) const
  70. {
  71. return Compare(Other);
  72. }
  73. inline
  74. int
  75. CLocation::operator!=(
  76. const CLocation &Other) const
  77. {
  78. return !Compare(Other);
  79. }
  80. inline
  81. const CGlobalId &
  82. CLocation::GetGlobalId(void)
  83. const
  84. {
  85. return m_giId;
  86. }
  87. inline
  88. TabId
  89. CLocation::GetTabId(void)
  90. const
  91. {
  92. return m_TabId;
  93. }
  94. inline
  95. View
  96. CLocation::GetView(void)
  97. const
  98. {
  99. return m_View;
  100. }
  101. inline
  102. Component
  103. CLocation::GetComponent(void)
  104. const
  105. {
  106. return m_Component;
  107. }
  108. inline
  109. BOOL
  110. CLocation::IsVisual(void)
  111. const
  112. {
  113. return (m_View == vVisualEditor);
  114. }
  115. inline
  116. void
  117. CLocation::SetGlobalId(
  118. const CGlobalId &gid)
  119. {
  120. m_giId = gid;
  121. }
  122. inline
  123. void
  124. CLocation::SetTabId(
  125. const TabId TabId)
  126. {
  127. m_TabId = TabId;
  128. }
  129. inline
  130. void
  131. CLocation::SetView(
  132. View vView)
  133. {
  134. m_View = vView;
  135. }
  136. inline
  137. void
  138. CLocation::SetComponent(
  139. Component comp)
  140. {
  141. m_Component = comp;
  142. }