I1* Document::indexById( const std::wstring& key ) { IndexMapIter itr( indexMap.find( key ) ); if( itr == indexMap.end() ) throw Class1Error( ERR1_NOID ); return itr->second; }
//get a TOC index from the id or name to TOC index map STD1::uint16_t Document::tocIndexById( GlobalDictionaryWord* id ) { NameMapIter itr( nameMap.find( id ) ); if( itr == nameMap.end() ) throw Class1Error( ERR1_NOID ); return itr->second.index(); }
//get a TOC index from the resource number to TOC index map STD1::uint16_t Document::tocIndexByRes( STD1::uint16_t res ) { ResMapIter itr( resMap.find( res ) ); if( itr == resMap.end() ) throw Class1Error( ERR1_NORES ); return itr->second.index(); }
void Document::addXRef( GlobalDictionaryWord* id, XRef& xref ) { NameMapIter itr( nameMap.find( id ) ); if( itr == nameMap.end() ) throw Class1Error( ERR1_NOID ); itr->second.addXRef( xref ); }
void Document::addXRef( STD1::uint16_t res, XRef& xref ) { ResMapIter itr( resMap.find( res ) ); if( itr == resMap.end() ) throw Class1Error( ERR1_NORES ); itr->second.addXRef( xref ); }
void ExternalFiles::addFile( std::wstring& str ) { if( table.find( str ) == table.end() ) { table.insert( std::map< std::wstring, STD1::uint16_t >::value_type( str, 0 ) ); if( table.size() >= 256 ) { throw Class1Error( ERR1_EXTFILESLARGE ); } } }