summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-07-15 17:55:04 +0200
committerljfa-ag <ljfa-ag@web.de>2015-07-15 17:55:04 +0200
commit367f7ef26704011929ea8e2bef9d9e73052897c6 (patch)
tree40e57c9db008602002a0a4e30373da3f5a11ed2f
parenta38d666be5330a1391eddf490574aa07f7dae9c7 (diff)
downloadProject-Tick-367f7ef26704011929ea8e2bef9d9e73052897c6.tar.gz
Project-Tick-367f7ef26704011929ea8e2bef9d9e73052897c6.zip
Add tag_array class stub
-rw-r--r--include/libnbt.h1
-rw-r--r--include/tag_array.h45
2 files changed, 46 insertions, 0 deletions
diff --git a/include/libnbt.h b/include/libnbt.h
index 965fa309ca..9a2198778c 100644
--- a/include/libnbt.h
+++ b/include/libnbt.h
@@ -24,5 +24,6 @@
#include "tag_string.h"
#include "tag_compound.h"
#include "tag_list.h"
+#include "tag_array.h"
#endif // LIBNBT_H_INCLUDED
diff --git a/include/tag_array.h b/include/tag_array.h
new file mode 100644
index 0000000000..ee36cdacc8
--- /dev/null
+++ b/include/tag_array.h
@@ -0,0 +1,45 @@
+/*
+ * libnbt++ - A library for the Minecraft Named Binary Tag format.
+ * Copyright (C) 2013, 2015 ljfa-ag
+ *
+ * This file is part of libnbt++.
+ *
+ * libnbt++ is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * libnbt++ is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with libnbt++. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef TAG_ARRAY_H_INCLUDED
+#define TAG_ARRAY_H_INCLUDED
+
+#include "crtp_tag.h"
+
+namespace nbt
+{
+
+/**
+ * @brief Tag that contains an array of byte or int values
+ *
+ * Common class for tag_byte_array and tag_int_array.
+ */
+template<class T>
+class tag_array final : public detail::crtp_tag<tag_array<T>>
+{
+
+};
+
+//Typedefs that should be used instead of the template tag_array.
+typedef tag_array<int8_t> tag_byte_array;
+typedef tag_array<int32_t> tag_int_array;
+
+}
+
+#endif // TAG_ARRAY_H_INCLUDED