diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-06-19 22:05:32 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-06-19 22:05:32 +0200 |
| commit | de95ca22ec87cc8b79ceb7beba475301461713a6 (patch) | |
| tree | dce723a717ac0ba583de992777d7d968c3be870b /binparse/binparse.hpp | |
| parent | cea325b7451c1fb8dd22462ec2e7b5b88ea9b547 (diff) | |
| download | openwar-de95ca22ec87cc8b79ceb7beba475301461713a6.tar.gz openwar-de95ca22ec87cc8b79ceb7beba475301461713a6.tar.bz2 openwar-de95ca22ec87cc8b79ceb7beba475301461713a6.zip | |
adds an LE file parser and refactors some code.
Diffstat (limited to 'binparse/binparse.hpp')
| -rw-r--r-- | binparse/binparse.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binparse/binparse.hpp b/binparse/binparse.hpp index 1620ab5..5b21086 100644 --- a/binparse/binparse.hpp +++ b/binparse/binparse.hpp @@ -3,6 +3,7 @@ #include <string> #include <ostream> #include <iomanip> +#include <vector> namespace binparse { @@ -39,6 +40,14 @@ Value32 parse<Value32>(std::istream& is, std::string name); template<> Offset32 parse<Offset32>(std::istream& is, std::string name); +template<> +std::array<uint8_t, 8> parse<std::array<uint8_t, 8>>(std::istream& is, std::string name); + +template<> +std::array<uint8_t, 22> parse<std::array<uint8_t, 22>>(std::istream& is, std::string name); + +void dump_bytes(std::istream& is, std::vector<uint8_t> buffer, std::string name); + std::string to_string(Magic16 magic); //overload inside this namespace to output unsigned char as value not as characters. |
