Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

MatchListView.h

Go to the documentation of this file.
00001 //
00002 // MatchListView.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Construction
00035 public:
00036         CMatchListView(LPCTSTR pszName, CMatchList* pList);
00037         virtual ~CMatchListView();
00038 
00039 // Attributes
00040 protected:
00041         CString                 m_sName;
00042         CMatchList*             m_pList;
00043         CPtrList                m_pSelection;
00044 
00045 // Operations
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 // Automation
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 // !defined(AFX_MATCHLISTVIEW_H__B1729FB8_4EE1_4CA3_A9E2_28C148D3BACB__INCLUDED_)

Generated on Thu Dec 15 10:39:44 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2