void CAlbumFolder::Serialize(CArchive& ar, int nVersion) { POSITION pos; if ( ar.IsStoring() ) { ar << m_sSchemaURI; ar.WriteCount( m_pXML != NULL ? 1 : 0 ); if ( m_pXML ) m_pXML->Serialize( ar ); ar << m_bCollSHA1; if ( m_bCollSHA1 ) ar.Write( &m_pCollSHA1, sizeof(SHA1) ); ar << m_sName; ar << m_bExpanded; ar << m_bAutoDelete; ar << m_sBestView; ar.WriteCount( GetFolderCount() ); for ( pos = GetFolderIterator() ; pos ; ) { CAlbumFolder* pFolder = GetNextFolder( pos ); pFolder->Serialize( ar, nVersion ); } ar.WriteCount( GetFileCount() ); for ( pos = GetFileIterator() ; pos ; ) { CLibraryFile* pFile = GetNextFile( pos ); ar << pFile->m_nIndex; } } else { CLibraryFile* pCollection = NULL; if ( m_pParent != NULL ) { ar >> m_sSchemaURI; m_pSchema = SchemaCache.Get( m_sSchemaURI ); } else {