00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_MATCHLISTVIEW_H__B1729FB8_4EE1_4CA3_A9E2_28C148D3BACB__INCLUDED_)
00023 #define AFX_MATCHLISTVIEW_H__B1729FB8_4EE1_4CA3_A9E2_28C148D3BACB__INCLUDED_
00024
00025 #pragma once
00026
00027 class CMatchList;
00028 class CMatchFile;
00029 class CQueryHit;
00030
00031
00032 class CMatchListView : public CComObject
00033 {
00034
00035 public:
00036 CMatchListView(LPCTSTR pszName, CMatchList* pList);
00037 virtual ~CMatchListView();
00038
00039
00040 protected:
00041 CString m_sName;
00042 CMatchList* m_pList;
00043 CPtrList m_pSelection;
00044
00045
00046 public:
00047 POSITION GetIterator() const;
00048 int GetCount() const;
00049 void GetNext(POSITION& pos, CMatchFile** ppFile, CQueryHit** ppHit) const;
00050 void GetNext(POSITION& pos, VARIANT* pVar) const;
00051 public:
00052 static IGenericView* Attach(LPCTSTR pszName, CMatchList* pList);
00053
00054
00055 protected:
00056 BEGIN_INTERFACE_PART(GenericView, IGenericView)
00057 DECLARE_DISPATCH()
00058 STDMETHOD(get_Name)(BSTR FAR* psName);
00059 STDMETHOD(get_Unknown)(IUnknown FAR* FAR* ppUnknown);
00060 STDMETHOD(get_Param)(LONG FAR* pnParam);
00061 STDMETHOD(get_Count)(LONG FAR* pnCount);
00062 STDMETHOD(get_Item)(VARIANT vIndex, VARIANT FAR* pvItem);
00063 STDMETHOD(get__NewEnum)(IUnknown FAR* FAR* ppEnum);
00064 END_INTERFACE_PART(GenericView)
00065
00066 BEGIN_INTERFACE_PART(EnumVARIANT, IEnumVARIANT)
00067 STDMETHOD(Next)(THIS_ DWORD celt, VARIANT FAR* rgvar, DWORD FAR* pceltFetched);
00068 STDMETHOD(Skip)(THIS_ DWORD celt);
00069 STDMETHOD(Reset)(THIS);
00070 STDMETHOD(Clone)(THIS_ IEnumVARIANT FAR* FAR* ppenum);
00071 POSITION m_pos;
00072 END_INTERFACE_PART(EnumVARIANT)
00073
00074 DECLARE_INTERFACE_MAP()
00075
00076 };
00077
00078 #endif