summaryrefslogtreecommitdiffstats
path: root/source/WSSCompact.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-25 09:18:52 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-25 09:18:52 +0200
commita4a418a679f1ac760a8763edd856f0178cfc6dde (patch)
tree85300ca3a2b3a942998a0c864ae90894857ebf5f /source/WSSCompact.h
parentFixed output directory structure in the "Release profiled" configuration (diff)
downloadcuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.gz
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.bz2
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.lz
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.xz
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.tar.zst
cuberite-a4a418a679f1ac760a8763edd856f0178cfc6dde.zip
Diffstat (limited to '')
-rw-r--r--source/WSSCompact.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/WSSCompact.h b/source/WSSCompact.h
index cd753ce9c..512cb7e5b 100644
--- a/source/WSSCompact.h
+++ b/source/WSSCompact.h
@@ -18,6 +18,36 @@
+/// Helper class for serializing a chunk into Json
+class cJsonChunkSerializer :
+ public cChunkDataCollector
+{
+public:
+
+ cJsonChunkSerializer(void);
+
+ Json::Value & GetRoot (void) {return m_Root; }
+ BLOCKTYPE * GetBlockData(void) {return m_BlockData; }
+ bool HasJsonData (void) const {return m_HasJsonData; }
+
+protected:
+
+ // NOTE: block data is serialized into inherited cChunkDataCollector's m_BlockData[] array
+
+ // Entities and BlockEntities are serialized to Json
+ Json::Value m_Root;
+ bool m_HasJsonData;
+
+ // cChunkDataCollector overrides:
+ virtual void Entity (cEntity * a_Entity) override;
+ virtual void BlockEntity (cBlockEntity * a_Entity) override;
+ virtual bool LightIsValid (bool a_IsLightValid) override;
+} ;
+
+
+
+
+
class cWSSCompact :
public cWSSchema
{