summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/ScoreboardSerializer.h
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-01-20 15:10:39 +0100
committerandrew <xdotftw@gmail.com>2014-01-20 15:10:39 +0100
commit7728f4bcbee7fa61f005c7b972685deb4bf04f2a (patch)
tree2aa40e20c9045a997abb25e17d2fa4890bf47e08 /src/WorldStorage/ScoreboardSerializer.h
parentScoreboard improvements (diff)
downloadcuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar.gz
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar.bz2
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar.lz
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar.xz
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.tar.zst
cuberite-7728f4bcbee7fa61f005c7b972685deb4bf04f2a.zip
Diffstat (limited to 'src/WorldStorage/ScoreboardSerializer.h')
-rw-r--r--src/WorldStorage/ScoreboardSerializer.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/WorldStorage/ScoreboardSerializer.h b/src/WorldStorage/ScoreboardSerializer.h
new file mode 100644
index 000000000..2a4e0767e
--- /dev/null
+++ b/src/WorldStorage/ScoreboardSerializer.h
@@ -0,0 +1,48 @@
+
+// ScoreboardSerializer.h
+
+// Declares the cScoreboardSerializer class that is used for saving scoreboards into NBT format used by Anvil
+
+
+
+
+
+#pragma once
+
+
+
+
+
+// fwd:
+class cFastNBTWriter;
+class cParsedNBT;
+class cScoreboard;
+
+
+
+
+class cScoreboardSerializer
+{
+public:
+ cScoreboardSerializer(const AString & a_WorldName, cScoreboard* a_ScoreBoard);
+
+ /// Try to load the scoreboard
+ bool Load(void);
+
+ /// Try to save the scoreboard
+ bool Save(void);
+
+private:
+
+ void SaveScoreboardToNBT(cFastNBTWriter & a_Writer);
+
+ bool LoadScoreboardFromNBT(const cParsedNBT & a_NBT);
+
+ cScoreboard* m_ScoreBoard;
+
+ AString m_Path;
+} ;
+
+
+
+