#include "StdAfx.h" #include "T2Archive.h" #include "T2MoviePlugin.h" #include "T2MoviePluginList.h" T2MoviePluginList::T2MoviePluginList() : CFilePluginList('MoPl') { } /*virtual*/ T2MoviePluginList::~T2MoviePluginList() { } void T2MoviePluginList::Read(T2Archive& inArchive) { unsigned int i, count; T2MoviePlugin *thePlugin; inArchive >> count; for (i = 0; i < count; i++) { DWORD id; inArchive >> id; thePlugin = (T2MoviePlugin *) GetItem(id); if (thePlugin) thePlugin->Read(inArchive); else T2MoviePlugin::sDummyRead(inArchive); } } void T2MoviePluginList::Write(T2Archive& inArchive) { unsigned int count; T2MoviePlugin *thePlugin; count = GetCount(); inArchive << count; POSITION pos = GetHeadPosition(); while (pos) { thePlugin = (T2MoviePlugin *) GetNext(pos); DWORD id = thePlugin->GetID(); inArchive << id; thePlugin->Write(inArchive); } }