Source code of Windows XP (NT5)
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.

79 lines
2.3 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // Dictionary.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file describes the class Dictionary.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 12/19/1997 Original version.
  16. // 01/15/1998 Removed IasDataSource aggregate.
  17. // 04/17/1998 Added reset() method.
  18. // 08/10/1998 Streamlined IDictionary interface.
  19. // 08/12/1998 Lookup attribute ID's with a SQL query.
  20. //
  21. ///////////////////////////////////////////////////////////////////////////////
  22. #ifndef _DICTIONARY_H_
  23. #define _DICTIONARY_H_
  24. #include <iastlb.h>
  25. #include <resource.h>
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CLASS
  29. //
  30. // Dictionary
  31. //
  32. // DESCRIPTION
  33. //
  34. // This class implements the IDictionary and IDictionary interfaces. It
  35. // also aggregates the IasDataSource object to expose the IIasDataSource
  36. // interface.
  37. //
  38. ///////////////////////////////////////////////////////////////////////////////
  39. class ATL_NO_VTABLE Dictionary :
  40. public CComObjectRootEx<CComMultiThreadModel>,
  41. public CComCoClass<Dictionary, &__uuidof(Dictionary)>,
  42. public IDictionary
  43. {
  44. public:
  45. IAS_DECLARE_REGISTRY(Dictionary, 1, 0, IASCoreLib)
  46. DECLARE_NOT_AGGREGATABLE(Dictionary)
  47. DECLARE_CLASSFACTORY_SINGLETON(Dictionary)
  48. BEGIN_COM_MAP(Dictionary)
  49. COM_INTERFACE_ENTRY_IID(__uuidof(IDictionary), IDictionary)
  50. END_COM_MAP()
  51. Dictionary() throw ();
  52. ~Dictionary() throw ();
  53. //////////
  54. // IDictionary
  55. //////////
  56. STDMETHOD(get_DataSource)(/*[out, retval]*/ IIasDataSource** pVal);
  57. STDMETHOD(put_DataSource)(/*[in]*/ IIasDataSource* newVal);
  58. STDMETHOD(get_AttributesTable)(/*[out, retval]*/ IUnknown** ppAttrTable);
  59. STDMETHOD(get_EnumeratorsTable)(/*[out, retval]*/ IUnknown** ppEnumTable);
  60. STDMETHOD(get_SyntaxesTable)(/*[out, retval]*/ IUnknown** ppSyntaxTable);
  61. STDMETHOD(ExecuteCommand)(/*[string][in]*/ LPCWSTR szCommandText,
  62. /*[retval][out]*/ IUnknown** ppRowset);
  63. STDMETHOD(GetAttributeID)(/*[in]*/ LPCWSTR szAttrName,
  64. /*[retval][out]*/ DWORD* plAttrID);
  65. protected:
  66. HRESULT openTable(LPCWSTR szTableName, IUnknown** ppTable) throw ();
  67. IIasDataSource* dataSource; // The data source used to read the dictionary.
  68. };
  69. #endif // _DICTIONARY_H_