| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*
- * GamePlayFile.h
- */
- #ifndef GPBDECODER_H_
- #define GPBDECODER_H_
- #include <iostream>
- #include <list>
- #include <assert.h>
- #include "FileIO.h"
- namespace gameplay
- {
- /**
- * This class is used for decoding a GPB file for the purpose of debugging.
- */
- class GPBDecoder
- {
- public:
- /**
- * Constructor.
- */
- GPBDecoder(void);
- /**
- * Destructor.
- */
- ~GPBDecoder(void);
- void readBinary(const std::string& filepath);
- bool validateHeading();
- void readRefs();
- void readRef();
- bool read(unsigned int* ptr);
- std::string readString(FILE* fp);
- private:
- FILE* _file;
- FILE* _outFile;
- };
- }
- #endif
|