summaryrefslogtreecommitdiffstats
path: root/source/NBT.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-04 14:07:38 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-04-04 14:07:38 +0200
commit3fe1622eda7df9c11c1bc798e37629a5defca6b8 (patch)
tree755aa5cf2065e559b00f448f79d1d63b1a5d02b0 /source/NBT.h
parentStringUtils' GetDirectoryContents() now accepts empty string and interprets it as "current directory" (*nix fix) (diff)
downloadcuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar.gz
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar.bz2
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar.lz
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar.xz
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.tar.zst
cuberite-3fe1622eda7df9c11c1bc798e37629a5defca6b8.zip
Diffstat (limited to 'source/NBT.h')
-rw-r--r--source/NBT.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/NBT.h b/source/NBT.h
index 75ff6e361..6d3ecebd9 100644
--- a/source/NBT.h
+++ b/source/NBT.h
@@ -201,6 +201,34 @@ public:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// The serializer:
+
+class cNBTSerializer
+{
+ static void WriteTag (AString & a_Out, const cNBTTag * a_Tag);
+
+ static void WriteByte (AString & a_Out, const char a_Value);
+ static void WriteInt16 (AString & a_Out, const Int16 a_Value);
+ static void WriteInt32 (AString & a_Out, const Int32 a_Value);
+ static void WriteInt64 (AString & a_Out, const Int64 a_Value);
+ static void WriteFloat (AString & a_Out, const float a_Value);
+ static void WriteDouble (AString & a_Out, const double a_Value);
+ static void WriteByteArray(AString & a_Out, const AString & a_Value);
+ static void WriteString (AString & a_Out, const AString & a_Value);
+ static void WriteList (AString & a_Out, const cNBTList * a_List);
+ static void WriteCompound (AString & a_Out, const cNBTCompound * a_Compound);
+ static void WriteIntArray (AString & a_Out, const cNBTIntArray * a_Array);
+
+public:
+
+ static void Serialize(const cNBTTree * a_Tree, AString & a_Out);
+} ;
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Dumping the tree (DEBUG-only)
#if (defined(_DEBUG) && defined(_WIN32))