3#include "../Utils/Il2cpp.hpp"
4#include "../Utils/Json.hpp"
9#define CP_SDK_CONFIG_JSONCONFIG_INSTANCE_DECL(__Type) \
11 CP_SDK_NO_COPYMOVE_CTORS(__Type) \
13 static __Type* m_Instance; \
15 static __Type* Instance();
17#define CP_SDK_CONFIG_JSONCONFIG_INSTANCE_IMPL(__Type) \
18 __Type* __Type::m_Instance = nullptr; \
19 __Type* __Type::Instance() { \
22 m_Instance = new __Type(); \
70 virtual void OnInit(
bool p_OnCreation) = 0;
virtual void Reset_Impl()=0
Reset config to default.
virtual std::filesystem::path GetFullPath()
Get full config path.
void Warmup()
Dummy method for warmup.
void Save()
Save config file.
virtual CP_SDK_JSON_SERIALIZE_DECL()=0
Read the document.
virtual std::filesystem::path GetRelativePath()=0
Get relative config path.
virtual ~JsonConfig()
Destructor.
virtual CP_SDK_JSON_UNSERIALIZE_DECL()=0
Write the document.
virtual void OnInit(bool p_OnCreation)=0
On config init.
void Reset()
Reset config to default.
void WriteFile(std::filesystem::path p_FullPath)
Write file.
Json configuration utilities.