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.

99 lines
2.2 KiB

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