Template Class PDJE_JSONHandler
Defined in File jsonWrapper.hpp
Class Documentation
-
template<typename CapnpWriterType>
class PDJE_JSONHandler Generic handler for reading/writing editor JSON files.
Public Functions
-
std::unique_ptr<CapnpWriterType> render()
Convert the current JSON data to a capnp writer object.
-
template<typename Target>
int deleteLine(const Target &args, bool skipType, bool skipDetail)
-
template<typename Target>
int deleteLine(const Target &args)
-
template<typename Target>
bool add(const Target &args)
-
template<typename Target>
void getAll(std::function<void(const Target &args)> jsonCallback)
-
bool load(const fs::path &path)
-
inline nj &operator[](const DONT_SANITIZE &key)
Access underlying JSON data by key.
-
inline bool save(const fs::path &path)
Save the JSON data to disk.
-
inline bool deleteFile(const fs::path &path)
Delete a JSON file from disk.
-
PDJE_JSONHandler() = default
-
~PDJE_JSONHandler() = default
-
bool add(const KEY_VALUE &args)
-
int deleteLine(const KEY &args)
-
void getAll(std::function<void(const KEY_VALUE &args)> jsonCallback)
-
bool load(const fs::path &path)
-
int deleteLine(const DONT_SANITIZE &args, bool skipType, bool skipDetail) = delete
-
int deleteLine(const MixArgs &args) = delete
-
int deleteLine(const MixArgs &args, bool skipType, bool skipDetail)
-
bool add(const MixArgs &args)
-
void getAll(std::function<void(const MixArgs &args)> jsonCallback)
-
std::unique_ptr<MIX_W> render()
-
bool load(const fs::path &path)
-
int deleteLine(const NoteArgs &args, bool skipType, bool skipDetail) = delete
-
int deleteLine(const MusicArgs &args)
-
bool add(const MusicArgs &args)
-
std::unique_ptr<MUSIC_W> render()
-
void getAll(std::function<void(const EDIT_ARG_MUSIC &args)> jsonCallback)
-
bool load(const fs::path &path)
-
bool add(const NoteArgs &args)
-
int deleteLine(const NoteArgs &args)
-
void getAll(std::function<void(const NoteArgs &args)> jsonCallback)
-
std::unique_ptr<NOTE_W> render()
-
bool load(const fs::path &path)
-
std::unique_ptr<CapnpWriterType> render()