Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfParser::ReadObjectFromStream ( int  nObjNo,
int  nIndex 
) [protected]

Read the object with index nIndex from the object stream nObjNo and push it on the objects vector m_vecOffsets.

All objects are read from this stream and the stream object is free'd from memory. Further calls who try to read from the same stream simply do nothing.

Parameters:
nObjNoobject number of the stream object
nIndexindex of the object which should be parsed

Definition at line 1050 of file PdfParser.cpp.

References PoDoFo::ePdfError_NoObject, PoDoFo::PdfVecObjects::GetObject(), and PODOFO_RAISE_ERROR_INFO.

Referenced by ReadObjectsInternal().

{
    // check if we already have read all objects
    // from this stream
    if( m_setObjectStreams.find( nObjNo ) != m_setObjectStreams.end() )
    {
        return;
    }
    else
        m_setObjectStreams.insert( nObjNo );

    // generation number of object streams is always 0
    PdfParserObject* pStream = dynamic_cast<PdfParserObject*>(m_vecObjects->GetObject( PdfReference( nObjNo, 0 ) ) );
    if( !pStream )
    {
        std::ostringstream oss;
        oss << "Loading of object " << nObjNo << " 0 R failed!" << std::endl;

        PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, oss.str().c_str() );
    }
    
    PdfObjectStreamParserObject pParserObject( pStream, m_vecObjects, m_buffer, m_pEncrypt );
    pParserObject.Parse();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index