Example #1
0
I1* Document::indexById( const std::wstring& key )
{
    IndexMapIter itr( indexMap.find( key ) );
    if( itr == indexMap.end() )
        throw Class1Error( ERR1_NOID );
    return itr->second;
}
Example #2
0
//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();
}
Example #3
0
//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();
}
Example #4
0
void Document::addXRef( GlobalDictionaryWord* id, XRef& xref )
{
    NameMapIter itr( nameMap.find( id ) );
    if( itr == nameMap.end() )
        throw Class1Error( ERR1_NOID );
    itr->second.addXRef( xref );
}
Example #5
0
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 );
}
Example #6
0
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 );
        }
    }
}