source: trunk/poppler/mypoppler/poppler/Parser.h @ 250

Last change on this file since 250 was 250, checked in by Eugene Romanenko, 13 years ago

PDF plugin: poppler library updated to version 0.8.3

File size: 1.4 KB
Line 
1//========================================================================
2//
3// Parser.h
4//
5// Copyright 1996-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9#ifndef PARSER_H
10#define PARSER_H
11
12#ifdef USE_GCC_PRAGMAS
13#pragma interface
14#endif
15
16#include "Lexer.h"
17
18//------------------------------------------------------------------------
19// Parser
20//------------------------------------------------------------------------
21
22class Parser {
23public:
24
25  // Constructor.
26  Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA);
27
28  // Destructor.
29  ~Parser();
30
31  // Get the next object from the input stream.
32  Object *getObj(Object *obj, Guchar *fileKey = NULL,
33                 CryptAlgorithm encAlgorithm = cryptRC4, int keyLength = 0,
34                 int objNum = 0, int objGen = 0);
35
36  // Get stream.
37  Stream *getStream() { return lexer->getStream(); }
38
39  // Get current position in file.
40  int getPos() { return lexer->getPos(); }
41
42private:
43
44  XRef *xref;                   // the xref table for this PDF file
45  Lexer *lexer;                 // input stream
46  GBool allowStreams;           // parse stream objects?
47  Object buf1, buf2;            // next two tokens
48  int inlineImg;                // set when inline image data is encountered
49
50  Stream *makeStream(Object *dict, Guchar *fileKey,
51                     CryptAlgorithm encAlgorithm, int keyLength,
52                     int objNum, int objGen);
53  void shift(int objNum = -1);
54};
55
56#endif
57
Note: See TracBrowser for help on using the repository browser.