source: trunk/poppler/mypoppler/fofi/FoFiBase.h @ 2

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

First import

File size: 1.3 KB
Line 
1//========================================================================
2//
3// FoFiBase.h
4//
5// Copyright 1999-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9#ifndef FOFIBASE_H
10#define FOFIBASE_H
11
12#ifdef USE_GCC_PRAGMAS
13#pragma interface
14#endif
15
16#include "goo/gtypes.h"
17
18//------------------------------------------------------------------------
19
20typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
21
22//------------------------------------------------------------------------
23// FoFiBase
24//------------------------------------------------------------------------
25
26class FoFiBase {
27public:
28
29  virtual ~FoFiBase();
30
31protected:
32
33  FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
34  static char *readFile(char *fileName, int *fileLen);
35
36  // S = signed / U = unsigned
37  // 8/16/32/Var = word length, in bytes
38  // BE = big endian
39  int getS8(int pos, GBool *ok);
40  int getU8(int pos, GBool *ok);
41  int getS16BE(int pos, GBool *ok);
42  int getU16BE(int pos, GBool *ok);
43  int getS32BE(int pos, GBool *ok);
44  Guint getU32BE(int pos, GBool *ok);
45  Guint getUVarBE(int pos, int size, GBool *ok);
46
47  GBool checkRegion(int pos, int size);
48
49  Guchar *fileData;
50  Guchar *file;
51  int len;
52  GBool freeFileData;
53};
54
55#endif
Note: See TracBrowser for help on using the repository browser.