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

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

PDF plugin: Poppler library updated to version 0.10.0

File size: 1.9 KB
Line 
1//========================================================================
2//
3// Parser.h
4//
5// Copyright 1996-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9//========================================================================
10//
11// Modified under the Poppler project - http://poppler.freedesktop.org
12//
13// All changes made under the Poppler project to this file are licensed
14// under GPL version 2 or later
15//
16// Copyright (C) 2006 Albert Astals Cid <aacid@kde.org>
17//
18// To see a description of the changes please see the Changelog file that
19// came with your tarball or type make ChangeLog if you are building from git
20//
21//========================================================================
22
23#ifndef PARSER_H
24#define PARSER_H
25
26#ifdef USE_GCC_PRAGMAS
27#pragma interface
28#endif
29
30#include "Lexer.h"
31
32//------------------------------------------------------------------------
33// Parser
34//------------------------------------------------------------------------
35
36class Parser {
37public:
38
39  // Constructor.
40  Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA);
41
42  // Destructor.
43  ~Parser();
44
45  // Get the next object from the input stream.
46  Object *getObj(Object *obj, Guchar *fileKey = NULL,
47                 CryptAlgorithm encAlgorithm = cryptRC4, int keyLength = 0,
48                 int objNum = 0, int objGen = 0);
49
50  // Get stream.
51  Stream *getStream() { return lexer->getStream(); }
52
53  // Get current position in file.
54  int getPos() { return lexer->getPos(); }
55
56private:
57
58  XRef *xref;                   // the xref table for this PDF file
59  Lexer *lexer;                 // input stream
60  GBool allowStreams;           // parse stream objects?
61  Object buf1, buf2;            // next two tokens
62  int inlineImg;                // set when inline image data is encountered
63
64  Stream *makeStream(Object *dict, Guchar *fileKey,
65                     CryptAlgorithm encAlgorithm, int keyLength,
66                     int objNum, int objGen);
67  void shift(int objNum = -1);
68};
69
70#endif
71
Note: See TracBrowser for help on using the repository browser.