Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Parser.h

Go to the documentation of this file.
00001 //========================================================================
00002 //
00003 // Parser.h
00004 //
00005 // Copyright 1996-2003 Glyph & Cog, LLC
00006 //
00007 //========================================================================
00008 
00009 #ifndef PARSER_H
00010 #define PARSER_H
00011 
00012 #include <aconf.h>
00013 
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017 
00018 #include "Lexer.h"
00019 
00020 //------------------------------------------------------------------------
00021 // Parser
00022 //------------------------------------------------------------------------
00023 namespace xpdf 
00024 {
00025   
00026 class Parser {
00027 public:
00028 
00029   // Constructor.
00030   Parser(XRef *xrefA, Lexer *lexerA);
00031 
00032   // Destructor.
00033   ~Parser();
00034 
00035   // Get the next object from the input stream.
00036 #ifndef NO_DECRYPTION
00037   Object *getObj(Object *obj,
00038                  Guchar *fileKey = NULL, int keyLength = 0,
00039                  int objNum = 0, int objGen = 0);
00040 #else
00041   Object *getObj(Object *obj);
00042 #endif
00043 
00044   // Get stream.
00045   Stream *getStream() { return lexer->getStream(); }
00046 
00047   // Get current position in file.
00048   int getPos() { return lexer->getPos(); }
00049 
00050 private:
00051 
00052   XRef *xref;                   // the xref table for this PDF file
00053   Lexer *lexer;                 // input stream
00054   Object buf1, buf2;            // next two tokens
00055   int inlineImg;                // set when inline image data is encountered
00056 
00057   Stream *makeStream(Object *dict);
00058   void shift();
00059 };
00060 };
00061 
00062 
00063 #endif
00064 

Generated on Wed Nov 3 12:59:01 2004 for Lemur Toolkit by doxygen1.2.18