if(it->first!=NLMAXFILE_APP_DATA_HEADER_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_HEADER_CHUNK_ID);disown();return;}
if(it->first!=PMBS_APP_DATA_HEADER_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,PMBS_APP_DATA_HEADER_CHUNK_ID);disown();return;}
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_CHUNK_ID);disown();return;}
if(it->first!=PMBS_APP_DATA_ENTRY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,PMBS_APP_DATA_ENTRY_CHUNK_ID);disown();return;}
if(m_ChunksOwnsPointers){nldebug("Not parsed, or disowned");return;}// Must have local ownership
if(m_Chunks.size()==0){nlwarning("Already cleaned (or did not build due to coding error)");return;}// Already cleaned
if(m_Chunks.begin()->first!=NLMAXFILE_APP_DATA_HEADER_CHUNK_ID){nlerror("Bad id %x, expected %x",(uint32)m_Chunks.begin()->first,NLMAXFILE_APP_DATA_HEADER_CHUNK_ID);return;}// Cannot happen, because we won't have local ownership if parsing failed
if(m_Chunks.begin()->first!=PMBS_APP_DATA_HEADER_CHUNK_ID){nlerror("Bad id %x, expected %x",(uint32)m_Chunks.begin()->first,PMBS_APP_DATA_HEADER_CHUNK_ID);return;}// Cannot happen, because we won't have local ownership if parsing failed
deletem_Chunks.begin()->second;// Delete the header chunk, since we own it
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_KEY_CHUNK_ID);disown();return;}
if(it->first!=PMBS_APP_DATA_ENTRY_KEY_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,PMBS_APP_DATA_ENTRY_KEY_CHUNK_ID);disown();return;}
m_Key=static_cast<CAppDataEntryKey*>(it->second);
++it;
if(it->first!=NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,NLMAXFILE_APP_DATA_ENTRY_VALUE_CHUNK_ID);disown();return;}
if(it->first!=PMBS_APP_DATA_ENTRY_VALUE_CHUNK_ID){nlwarning("Bad id %x, expected %x",(uint32)it->first,PMBS_APP_DATA_ENTRY_VALUE_CHUNK_ID);disown();return;}
if(m_SuperClassDescriptions.find(desc->superClassId())!=m_SuperClassDescriptions.end()){nlerror("Already added this superclass to the registry");return;}