~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/xpdflib/parser.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

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