From 2ee0f834487cfe4b6bd9424ca2715685a8db16e4 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 15 Apr 2017 15:17:53 +0500 Subject: 2017-04-15 --- FieldParser.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 FieldParser.hpp (limited to 'FieldParser.hpp') diff --git a/FieldParser.hpp b/FieldParser.hpp new file mode 100644 index 0000000..274ab9e --- /dev/null +++ b/FieldParser.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "Field.hpp" + +class FieldParser { +public: + static Field ParseVarInt(byte *data, size_t len); + + static Field ParseBool(byte *data, size_t len); + + static Field ParseString(byte *data, size_t len); + + static Field Parse(FieldType type, byte* data, size_t len=0); + + static Field ParseLong(byte *data, size_t len); + + static Field ParseInt(byte *data, size_t len); + + static Field ParseUByte(byte *data, size_t len); + + static Field ParseByte(byte *data, size_t len); + + static Field ParseFloat(byte *data, size_t len); + + static Field ParsePosition(byte *data, size_t len); + + static Field ParseDouble(byte *data, size_t len); + + static Field ParseByteArray(byte *data, size_t len); +}; \ No newline at end of file -- cgit v1.2.3