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.

98 lines
2.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: schema.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #if !defined(LOCUTIL_Schema_h_INCLUDED)
  11. #define LOCUTIL_Schema_h_INCLUDED
  12. #pragma once
  13. namespace MitDisplayColumns
  14. {
  15. interface IManager;
  16. interface IOption;
  17. };
  18. class CColDefList;
  19. //------------------------------------------------------------------------------
  20. class LTAPIENTRY SchemaId : public _GUID
  21. {
  22. public:
  23. SchemaId();
  24. SchemaId(const _GUID &);
  25. void Load(CArchive &);
  26. void Store(CArchive &) const;
  27. void Serialize(CArchive &);
  28. const SchemaId & operator=(const SchemaId &);
  29. const SchemaId & operator=(const _GUID &);
  30. INT operator==(const SchemaId &);
  31. INT operator!=(const SchemaId &);
  32. private:
  33. BOOL Compare(const SchemaId &);
  34. };
  35. //------------------------------------------------------------------------------
  36. class LTAPIENTRY CTableSchema : public CRefCount
  37. {
  38. // Construction
  39. public:
  40. CTableSchema(const SchemaId &, const CLString &, const CColDefList &);
  41. // Data
  42. protected:
  43. SchemaId m_Schema;
  44. CLString m_strDescription;
  45. CColDefList m_lstColDefs;
  46. // Attributes
  47. public:
  48. const SchemaId & GetSchemaId() const;
  49. const CLString & GetDescription() const;
  50. const CColDefList & GetColDefList() const;
  51. int GetDisplayColumnCount() const;
  52. // Operations
  53. public:
  54. const CColumnDefinition * GetColumnDefinition(long nSearchID) const;
  55. const CColumnDefinition * GetColumnDefinition(const CLString & stSearchID) const;
  56. // Debugging
  57. #ifdef _DEBUG
  58. void AssertValid() const;
  59. #endif
  60. };
  61. //------------------------------------------------------------------------------
  62. struct LTAPIENTRY DcsHelp
  63. {
  64. static void
  65. BuildDCOption(CTableSchema const * const pSchema, _bstr_t bstrID,
  66. MitDisplayColumns::IManager * const pManager,
  67. MitDisplayColumns::IOption ** ppOption = NULL);
  68. static void
  69. BuildDCOption(CTableSchema const * const pSchema, _bstr_t bstrID, _bstr_t bstrName,
  70. MitDisplayColumns::IManager * const pManager, long rgID[], int cIDs,
  71. MitDisplayColumns::IOption ** ppOption = NULL);
  72. };
  73. #if !defined(_DEBUG) || defined(IMPLEMENT)
  74. #include "schema.inl"
  75. #endif
  76. #endif // LOCUTIL_Schema_h_INCLUDED