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

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 15 years ago

First import

File size: 1.2 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);
27
28  // Destructor.
29  ~Parser();
30
31  // Get the next object from the input stream.
32  Object *getObj(Object *obj,
33                 Guchar *fileKey = NULL, 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  Object buf1, buf2;            // next two tokens
47  int inlineImg;                // set when inline image data is encountered
48
49  Stream *makeStream(Object *dict);
50  void shift(int objNum = -1);
51};
52
53#endif
54
Note: See TracBrowser for help on using the repository browser.