00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _vuPARSER_H_
00010 #define _vuPARSER_H_
00011
00012 #include "vuSimpleTypes.h"
00013 #include "vuString.h"
00014 #include "vuDVector.h"
00015 #include <fstream.h>
00016
00021 typedef vuDVector<vuString> StringList;
00022
00036 class vuParser
00037 {
00038 public:
00042 vuParser();
00047 virtual ~vuParser();
00048
00054 virtual void Parse(const char* filename) throw (const char *) {};
00055
00056 protected:
00058 void readBuffer(const char* filename);
00060 void FixBuffer();
00061
00063 bool readString(const char* s);
00065
00067 bool readString(const char* prefix, char* s);
00069
00071 bool readNumber(const char* prefix, float& t);
00072
00074 bool readToken(char token, bool eat = true);
00076 bool finished();
00077
00079 char *m_Buffer;
00081 dword m_Len;
00083 dword m_Pos;
00084
00085 };
00086
00087
00088 #endif