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.

53 lines
1.5 KiB

  1. // INDEXIMP.H: Definition of CITIndexLocal
  2. #ifndef __INDEXIMP_H__
  3. #define __INDEXIMP_H__
  4. #include "verinfo.h"
  5. #include "idxobr.h"
  6. // Implemenation of IITIndex
  7. class CITIndexLocal:
  8. public IITIndex,
  9. public CComObjectRootEx<CComMultiThreadModel>,
  10. public CComCoClass<CITIndexLocal, &CLSID_IITIndexLocal>
  11. {
  12. public:
  13. CITIndexLocal() : m_idx(NULL), m_fSkipOcc(FALSE), m_pCatalog(NULL),
  14. m_piwbrk(NULL) {;}
  15. virtual ~CITIndexLocal() { if (m_idx) Close(); }
  16. BEGIN_COM_MAP(CITIndexLocal)
  17. COM_INTERFACE_ENTRY(IITIndex)
  18. END_COM_MAP()
  19. DECLARE_REGISTRY(CLSID_IITIndexLocal, "ITIR.IndexSearch.4", "ITIR.IndexSearch", 0, THREADFLAGS_BOTH)
  20. // IITIndex methods
  21. public:
  22. STDMETHOD(Open)(IITDatabase* pITDB, LPCWSTR lpszIndexMoniker, BOOL fInsideDB);
  23. STDMETHOD(CreateQueryInstance)(IITQuery** ppITQuery);
  24. STDMETHOD(Search)(IITQuery* pITQuery, IITResultSet* pITResult);
  25. STDMETHOD(Search)(IITQuery* pITQuery, IITGroup* pITGroup);
  26. STDMETHOD(Close)(void);
  27. STDMETHOD(GetLocaleInfo)(DWORD *pdwCodePageID, LCID *plcid);
  28. STDMETHOD(GetWordBreakerInstance)(DWORD *pdwObjInstance);
  29. // Private methods
  30. private:
  31. STDMETHOD(HitListToResultSet)(LPHL pHitList, IITResultSet* pITResult,
  32. CITIndexObjBridge *pidxobr);
  33. STDMETHOD(QueryParse)(IITQuery* pITQuery, LPQT* pQueryTree,
  34. CITIndexObjBridge *pidxobr);
  35. // Data members
  36. private:
  37. LPIDX m_idx;
  38. BOOL m_fSkipOcc;
  39. IITCatalog* m_pCatalog;
  40. PIWBRK m_piwbrk; // pointer to IWordBreakerConfig
  41. _ThreadModel::AutoCriticalSection m_cs; // Critical section obj.
  42. };
  43. #endif