diff options
Diffstat (limited to 'modules/codec-minecraft/var_int_data.hpp')
-rw-r--r-- | modules/codec-minecraft/var_int_data.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/codec-minecraft/var_int_data.hpp b/modules/codec-minecraft/var_int_data.hpp new file mode 100644 index 0000000..4fbdd57 --- /dev/null +++ b/modules/codec-minecraft/var_int_data.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <forstio/data.h> + +namespace saw { +template<> +class data<schema::VarInt, encode::Native> { +private: + int32_t data_; +public: + data(); + data(int32_t data); + + int32_t get() const; + void set(int32_t); +}; + +template<> +class data<schema::VarLong, encode::Native> { +private: + int64_t data_; +public: + data(); + data(int64_t data); + + int64_t get() const; + void set(int64_t); +}; + + +} |