GPBDecoder.h 614 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef GPBDECODER_H_
  2. #define GPBDECODER_H_
  3. #include "FileIO.h"
  4. namespace gameplay
  5. {
  6. /**
  7. * This class is used for decoding a GPB file for the purpose of debugging.
  8. */
  9. class GPBDecoder
  10. {
  11. public:
  12. /**
  13. * Constructor.
  14. */
  15. GPBDecoder(void);
  16. /**
  17. * Destructor.
  18. */
  19. ~GPBDecoder(void);
  20. void readBinary(const std::string& filepath);
  21. bool validateHeading();
  22. void readRefs();
  23. void readRef();
  24. bool read(unsigned int* ptr);
  25. std::string readString(FILE* fp);
  26. private:
  27. FILE* _file;
  28. FILE* _outFile;
  29. };
  30. }
  31. #endif