#include "CFilePlugin.h" #include "CFilePluginList.h" CFilePluginList::CFilePluginList(DWORD pluginType) { mPluginType = pluginType; } /*virtual*/ CFilePluginList::~CFilePluginList() { } /*virtual*/ void CFilePluginList::AllClear() { RemoveAll(); } /*virtual*/ BOOL CFilePluginList::Add(CFilePlugin* plugin) { BOOL found = false; POSITION pos = GetHeadPosition(); while (!found && pos) { CFilePlugin *check = GetNext(pos); if (check->GetID() == plugin->GetID()) found = true; } if (!found) AddTail(plugin); return !found; } /*virtual*/ unsigned int CFilePluginList::GetItemCount() { return GetCount(); } /*virtual*/ CFilePlugin* CFilePluginList::GetItemAt(POSITION pos) { return GetAt(pos); } CFilePlugin* CFilePluginList::GetItem(DWORD id) { POSITION pos = GetHeadPosition(); while (pos) { CFilePlugin *check = GetNext(pos); if (check->GetID() == id) return check; } return NULL; }