Files
core/ASCOfficePDFReader/Parser.h

48 lines
1.2 KiB
C++

#ifndef _PARSER_H
#define _PARSER_H
#include "Lexer.h"
//------------------------------------------------------------------------
// Parser
//------------------------------------------------------------------------
class Parser
{
public:
Parser(XRef *pXref, Lexer *pLexer, BOOL bAllowStreams);
~Parser();
// Ñ÷èòûâàåì ñëåäóþùèé îáúåêò èç ïîòîêà.
Object *GetObject(Object *pObject, unsigned char *sDecryptKey = NULL, CryptAlgorithm eEncryptAlgorithm = cryptRC4, int nKeyLength = 0, int nObjectNum = 0, int nObjectGen = 0);
Stream *GetStream()
{
return m_pLexer->GetStream();
}
int GetPos()
{
return m_pLexer->GetPos();
}
private:
Stream *CreateStream(Object *pDict, unsigned char *sDecryptKey, CryptAlgorithm eEncryptAlgorithm, int nKeyLength, int nObjectNum, int nObjectGen);
void Shift();
private:
XRef *m_pXref; // Òàáëèöà Xref äëÿ äàííthe xref table for this PDF file
Lexer *m_pLexer; // Âõîäÿùèé ïîòîê
BOOL m_bAllowStreams; // Áóäåì ëè ïàðñèòü Stream Objects?
Object m_oBuffer1; // Äâà ñëåäóþùèõ îáúåêòà
Object m_oBuffer2; //
int m_nInlineImage; // Óñòàíàâëèâàåì, êîãäà ñòàëêèâàåìñÿ ñ Inline Image
};
#endif /* _PARSER_H */