#include "CPluginInfo.h" #include "CPluginInfoArray.h" #include "CPluginInfoComparator.h" CPluginInfoArray::CPluginInfoArray(BOOL ownsPluginInfo) : LArray(sizeof(CPluginInfo *), CPluginInfoComparator::GetComparator(), true) { mOwnsComparator = false; mOwnsPluginInfo = ownsPluginInfo; } /*virtual*/ CPluginInfoArray::~CPluginInfoArray() { if (mOwnsPluginInfo) { CPluginInfo *info; LArrayIterator iter(*this); while (iter.Next(&info)) delete info; } } int CPluginInfoArray::GetUsedCount() { CPluginInfo *info; int numPlugins = 0; LArrayIterator iter(*this); while (iter.Next(&info)) { if (info->IsUsed()) numPlugins++; } return numPlugins; }