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

FoFiBase.h

Go to the documentation of this file.
00001 //========================================================================
00002 //
00003 // FoFiBase.h
00004 //
00005 // Copyright 1999-2003 Glyph & Cog, LLC
00006 //
00007 //========================================================================
00008 
00009 #ifndef FOFIBASE_H
00010 #define FOFIBASE_H
00011 
00012 #include <aconf.h>
00013 
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017 
00018 #include "gtypes.h"
00019 
00020 //------------------------------------------------------------------------
00021 
00022 typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
00023 
00024 //------------------------------------------------------------------------
00025 // FoFiBase
00026 //------------------------------------------------------------------------
00027 
00028 class FoFiBase {
00029 public:
00030 
00031   virtual ~FoFiBase();
00032 
00033 protected:
00034 
00035   FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
00036   static char *readFile(char *fileName, int *fileLen);
00037 
00038   // S = signed / U = unsigned
00039   // 8/16/32/Var = word length, in bytes
00040   // BE = big endian
00041   int getS8(int pos, GBool *ok);
00042   int getU8(int pos, GBool *ok);
00043   int getS16BE(int pos, GBool *ok);
00044   int getU16BE(int pos, GBool *ok);
00045   int getS32BE(int pos, GBool *ok);
00046   Guint getU32BE(int pos, GBool *ok);
00047   Guint getUVarBE(int pos, int size, GBool *ok);
00048 
00049   GBool checkRegion(int pos, int size);
00050 
00051   Guchar *fileData;
00052   Guchar *file;
00053   int len;
00054   GBool freeFileData;
00055 };
00056 
00057 #endif

Generated on Wed Nov 3 12:58:55 2004 for Lemur Toolkit by doxygen1.2.18