Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
jsonio::NlohmannJsonUtility Class Reference

Implements JsonUtility interface; imports / exports objects from / to json files using the Nlohmann json library. More...

#include <json_utility_nlohmann.hpp>

Inheritance diagram for jsonio::NlohmannJsonUtility:
Inheritance graph
Collaboration diagram for jsonio::NlohmannJsonUtility:
Collaboration graph

Public Member Functions

template<typename T >
void ImplementImport (T &object, const std::string file_path)
 
template<typename T >
void ImplementExport (T &object, const std::string file_path)
 
void ImplementImport (piecepoints::BPOPointsSKeys &bpo_points, const std::string file_path)
 
void ImplementExport (piecepoints::BPOPointsSKeys &bpo_points, const std::string file_path)
 
- Public Member Functions inherited from JsonUtility< NlohmannJsonUtility >
void Import (T &object, const string file_path)
 
void Import (piecepoints::BPOPointsSKeys &bpo_points, const string file_path)
 
void Export (T &object, const string file_path)
 
void Export (piecepoints::BPOPointsSKeys &bpo_points, const string file_path)
 

Private Member Functions

void ExportSerializedJson (nlohmann::json serialized_json, const std::string file_path)
 
nlohmann::json ImportToSerializedJson (const std::string file_path)
 
void Deserialize (nlohmann::json serialized_json, piecepoints::BPOPointsSKeys &bpo_points)
 
nlohmann::json Serialize (piecepoints::BPOPointsSKeys &bpo_points)
 

Detailed Description

Implements JsonUtility interface; imports / exports objects from / to json files using the Nlohmann json library.

Definition at line 17 of file json_utility_nlohmann.hpp.

Member Function Documentation

◆ Deserialize()

void jsonio::NlohmannJsonUtility::Deserialize ( nlohmann::json  serialized_json,
piecepoints::BPOPointsSKeys bpo_points 
)
private

Definition at line 42 of file json_utility_nlohmann.cpp.

◆ ExportSerializedJson()

void jsonio::NlohmannJsonUtility::ExportSerializedJson ( nlohmann::json  serialized_json,
const std::string  file_path 
)
private

Definition at line 28 of file json_utility_nlohmann.cpp.

◆ ImplementExport() [1/2]

void jsonio::NlohmannJsonUtility::ImplementExport ( piecepoints::BPOPointsSKeys bpo_points,
const std::string  file_path 
)

◆ ImplementExport() [2/2]

template<typename T >
void jsonio::NlohmannJsonUtility::ImplementExport ( T &  object,
const std::string  file_path 
)
inline

Definition at line 26 of file json_utility_nlohmann.hpp.

◆ ImplementImport() [1/2]

void jsonio::NlohmannJsonUtility::ImplementImport ( piecepoints::BPOPointsSKeys bpo_points,
const std::string  file_path 
)

◆ ImplementImport() [2/2]

template<typename T >
void jsonio::NlohmannJsonUtility::ImplementImport ( T &  object,
const std::string  file_path 
)
inline

Definition at line 20 of file json_utility_nlohmann.hpp.

◆ ImportToSerializedJson()

nlohmann::json jsonio::NlohmannJsonUtility::ImportToSerializedJson ( const std::string  file_path)
private

Definition at line 36 of file json_utility_nlohmann.cpp.

◆ Serialize()

nlohmann::json jsonio::NlohmannJsonUtility::Serialize ( piecepoints::BPOPointsSKeys bpo_points)
private

Definition at line 52 of file json_utility_nlohmann.cpp.


The documentation for this class was generated from the following files: