summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-06-21 10:55:43 +0200
committerljfa-ag <ljfa-ag@web.de>2015-06-21 11:17:20 +0200
commit483714e26ef6fca97353ca34654e5588bc61dda0 (patch)
tree6f266e108b4b3a02923520cdf8d1bbbaf50157b2 /include
parent8458a8d07f5990c33c15acfa2ac316b0a9d6ede0 (diff)
downloadProject-Tick-483714e26ef6fca97353ca34654e5588bc61dda0.tar.gz
Project-Tick-483714e26ef6fca97353ca34654e5588bc61dda0.zip
Add tag.h
Diffstat (limited to 'include')
-rw-r--r--include/tag.h37
1 files changed, 37 insertions, 0 deletions
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 <cstdint>
+
+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