From 483714e26ef6fca97353ca34654e5588bc61dda0 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sun, 21 Jun 2015 10:55:43 +0200 Subject: Add tag.h --- include/tag.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/tag.h (limited to 'include') diff --git a/include/tag.h b/include/tag.h new file mode 100644 index 0000000000..a17406ff2b --- /dev/null +++ b/include/tag.h @@ -0,0 +1,37 @@ +#ifndef TAG_H_INCLUDED +#define TAG_H_INCLUDED + +#include + +namespace nbt +{ + +/** Tag type values used in the binary format */ +enum class tag_type : int8_t +{ + End = 0, + Byte = 1, + Short = 2, + Int = 3, + Long = 4, + Float = 5, + Double = 6, + Byte_Array = 7, + String = 8, + List = 9, + Compound = 10, + Int_Array = 11 +}; + +/** Base class for all tag classes */ +class tag +{ +public: + virtual ~tag() noexcept {} + + virtual tag_type get_type() const noexcept = 0; +}; + +} + +#endif // TAG_H_INCLUDED -- cgit 0.0.5-2-1-g0f52