diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-10-17 02:30:52 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-10-17 02:30:52 +0200 |
commit | e933ccb59c7f032d2ffc5c5f7046317a06e85e14 (patch) | |
tree | db0992ce4d337d9a0f3761fd111385a38f71af45 /c++/codec-minecraft/var_int_data.h | |
parent | 37a120868976520c54a9df29d246c68c599bf917 (diff) |
codec,codec-minecraft: Adding basic foundations needed for the minecraft
protocol
Diffstat (limited to 'c++/codec-minecraft/var_int_data.h')
-rw-r--r-- | c++/codec-minecraft/var_int_data.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/c++/codec-minecraft/var_int_data.h b/c++/codec-minecraft/var_int_data.h new file mode 100644 index 0000000..807c930 --- /dev/null +++ b/c++/codec-minecraft/var_int_data.h @@ -0,0 +1,31 @@ +#pragma once + +#include <forstio/core/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); +}; + + +} |