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.

145 lines
1.5 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. SCHEMA.INL
  5. History:
  6. --*/
  7. inline
  8. SchemaId::SchemaId()
  9. : _GUID(GUID_NULL)
  10. {}
  11. inline
  12. SchemaId::SchemaId(
  13. const _GUID &guid)
  14. : _GUID(guid)
  15. {}
  16. inline
  17. void
  18. SchemaId::Load(
  19. CArchive &ar)
  20. {
  21. if (ar.Read((_GUID *) this, sizeof(_GUID)) != sizeof(_GUID))
  22. {
  23. AfxThrowArchiveException(CArchiveException::endOfFile);
  24. }
  25. }
  26. inline
  27. void
  28. SchemaId::Store(
  29. CArchive &ar)
  30. const
  31. {
  32. ar.Write((_GUID *) this, sizeof(_GUID));
  33. }
  34. inline
  35. void
  36. SchemaId::Serialize(
  37. CArchive &ar)
  38. {
  39. if (ar.IsStoring())
  40. {
  41. Store(ar);
  42. }
  43. else
  44. {
  45. Load(ar);
  46. }
  47. }
  48. inline
  49. const SchemaId &
  50. SchemaId::operator=(
  51. const SchemaId &other)
  52. {
  53. return operator=((_GUID &)other);
  54. }
  55. inline
  56. const SchemaId &
  57. SchemaId::operator=(
  58. const _GUID &other)
  59. {
  60. (_GUID &)(*this) = other;
  61. return *this;
  62. }
  63. inline
  64. int
  65. SchemaId::operator==(
  66. const SchemaId &other)
  67. {
  68. return Compare(other);
  69. }
  70. inline
  71. int
  72. SchemaId::operator!=(
  73. const SchemaId &other)
  74. {
  75. return !Compare(other);
  76. }
  77. inline
  78. BOOL
  79. SchemaId::Compare(
  80. const SchemaId &other)
  81. {
  82. return ((_GUID &)*this) == ((_GUID &)other);
  83. }
  84. inline
  85. const SchemaId &
  86. CTableSchema::GetSchemaId() const
  87. {
  88. return m_Schema;
  89. }
  90. inline
  91. const CLString &
  92. CTableSchema::GetDescription() const
  93. {
  94. return m_strDescription;
  95. }
  96. inline
  97. const CColDefList &
  98. CTableSchema::GetColDefList() const
  99. {
  100. return m_lstColDefs;
  101. }