1
0
Files
cuberite-2a/src/WorldStorage/StatSerializer.h

46 lines
605 B
C
Raw Normal View History

2014-05-11 14:57:06 +03:00
// StatSerializer.h
// Declares the cStatSerializer class that is used for saving stats into JSON
#pragma once
// fwd:
class cStatManager;
namespace Json { class Value; }
2014-05-11 14:57:06 +03:00
class cStatSerializer
{
public:
cStatSerializer(cStatManager & a_Manager, const AString & a_WorldName, const AString & a_FileName);
2014-05-11 14:57:06 +03:00
/* Try to load the player statistics. */
void Load(void);
2014-05-11 14:57:06 +03:00
/* Try to save the player statistics. */
void Save(void);
2014-05-11 14:57:06 +03:00
private:
2014-05-11 14:57:06 +03:00
void SaveStatToJSON(Json::Value & a_Out);
void LoadCustomStatFromJSON(const Json::Value & a_In);
2014-05-11 14:57:06 +03:00
cStatManager & m_Manager;
2014-05-11 14:57:06 +03:00
AString m_Path;
} ;