]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | //======================================================================== |
2 | // | |
3 | // PSTokenizer.h | |
4 | // | |
5 | // Copyright 2002-2003 Glyph & Cog, LLC | |
6 | // | |
7 | //======================================================================== | |
8 | ||
9 | #ifndef PSTOKENIZER_H | |
10 | #define PSTOKENIZER_H | |
11 | ||
12 | #include <config.h> | |
13 | ||
14 | #ifdef USE_GCC_PRAGMAS | |
15 | #pragma interface | |
16 | #endif | |
17 | ||
18 | #include "gtypes.h" | |
19 | ||
20 | //------------------------------------------------------------------------ | |
21 | ||
22 | class PSTokenizer { | |
23 | public: | |
24 | ||
25 | PSTokenizer(int (*getCharFuncA)(void *), void *dataA); | |
26 | ~PSTokenizer(); | |
27 | ||
28 | // Get the next PostScript token. Returns false at end-of-stream. | |
29 | GBool getToken(char *buf, int size, int *length); | |
30 | ||
31 | private: | |
32 | ||
33 | int lookChar(); | |
34 | int getChar(); | |
35 | ||
36 | int (*getCharFunc)(void *); | |
37 | void *data; | |
38 | int charBuf; | |
39 | }; | |
40 | ||
41 | #endif |