1
0

Make StatSerializer a namespace

This commit is contained in:
Tiger Wang
2020-08-20 23:27:08 +01:00
parent 8cca3db61b
commit e23dcffaff
3 changed files with 98 additions and 112 deletions

View File

@@ -21,27 +21,11 @@ namespace Json { class Value; }
class cStatSerializer
namespace StatSerializer
{
public:
cStatSerializer(cStatManager & Manager, const std::string & WorldPath, std::string FileName);
/* Try to load the player statistics. */
void Load(void);
void Load(cStatManager & Manager, const std::string & WorldPath, std::string FileName);
/* Try to save the player statistics. */
void Save(void);
private:
void SaveStatToJSON(Json::Value & a_Out);
void LoadLegacyFromJSON(const Json::Value & In);
void LoadCustomStatFromJSON(const Json::Value & a_In);
cStatManager & m_Manager;
std::string m_Path;
} ;
void Save(const cStatManager & Manager, const std::string & WorldPath, std::string FileName);
}