diff options
author | andrew <xdotftw@gmail.com> | 2014-05-11 13:57:06 +0200 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-05-11 13:57:06 +0200 |
commit | c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14 (patch) | |
tree | e26a406f738328936caf2a0b361ff5745510d113 /src/WorldStorage/StatSerializer.h | |
parent | Merge pull request #992 from mc-server/coverity_fixes (diff) | |
download | cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar.gz cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar.bz2 cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar.lz cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar.xz cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.tar.zst cuberite-c7c3724a3ee0e7a77fe9924ad25c36b6ec8fdd14.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/StatSerializer.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/WorldStorage/StatSerializer.h b/src/WorldStorage/StatSerializer.h new file mode 100644 index 000000000..43514465b --- /dev/null +++ b/src/WorldStorage/StatSerializer.h @@ -0,0 +1,53 @@ + +// StatSerializer.h + +// Declares the cStatSerializer class that is used for saving stats into JSON + + + + + +#pragma once + +#include "json/json.h" + + + + + +// fwd: +class cStatManager; + + + + +class cStatSerializer +{ +public: + + cStatSerializer(const AString& a_WorldName, const AString& a_PlayerName, cStatManager* a_Manager); + + bool Load(void); + + bool Save(void); + + +protected: + + void SaveStatToJSON(Json::Value & a_Out); + + bool LoadStatFromJSON(const Json::Value & a_In); + + +private: + + cStatManager* m_Manager; + + AString m_Path; + + +} ; + + + + |