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.

117 lines
2.2 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: uniqid.inl
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Inline function definitions for the Espresso Unique ID. This file should
  8. // ONLY be included by uniqid.h.
  9. //
  10. //-----------------------------------------------------------------------------
  11. inline
  12. const DBID&
  13. CLocUniqueId::GetParentId(void)
  14. const
  15. {
  16. return m_dbid;
  17. }
  18. inline
  19. const CLocTypeId &
  20. CLocUniqueId::GetTypeId(void)
  21. const
  22. {
  23. return m_tid;
  24. }
  25. inline
  26. const CLocResId &
  27. CLocUniqueId::GetResId(void)
  28. const
  29. {
  30. return m_rid;
  31. }
  32. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  33. //
  34. // Returns the parent ID for the item. This portion of the ID is set by the
  35. // parser.
  36. //
  37. //-----------------------------------------------------------------------------
  38. inline
  39. DBID&
  40. CLocUniqueId::GetParentId(void)
  41. {
  42. return m_dbid;
  43. }
  44. inline
  45. CLocTypeId &
  46. CLocUniqueId::GetTypeId(void)
  47. {
  48. return m_tid;
  49. }
  50. inline
  51. CLocResId &
  52. CLocUniqueId::GetResId(void)
  53. {
  54. return m_rid;
  55. }
  56. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  57. //
  58. // Comapre two ID's.
  59. //
  60. //-----------------------------------------------------------------------------
  61. inline
  62. int // Zero if different
  63. CLocUniqueId::operator==(
  64. const CLocUniqueId &uidOther) // ID to compare to.
  65. const
  66. {
  67. return IsEqualTo(uidOther);
  68. }
  69. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  70. //
  71. // Compare two ID's
  72. //
  73. //-----------------------------------------------------------------------------
  74. inline
  75. int // Zero if identical
  76. CLocUniqueId::operator!=(
  77. const CLocUniqueId &uidOther) // ID to compare to.
  78. const
  79. {
  80. return !IsEqualTo(uidOther);
  81. }
  82. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  83. //
  84. // Sets the Parent ID component of the ID.
  85. //
  86. //-----------------------------------------------------------------------------
  87. inline
  88. void
  89. CLocUniqueId::SetParentId(
  90. const DBID& dbidNewId) // New Parent ID
  91. {
  92. m_dbid = dbidNewId;
  93. }