21#ifndef KICAD_JSON_SETTINGS_INTERNALS_H
22#define KICAD_JSON_SETTINGS_INTERNALS_H
25#include <nlohmann/json.hpp>
43 template<
typename ValueType>
47 ( *this )[aPath] = aVal;
50 template<
typename ValueType>
51 ValueType
Get(
const std::string& aPath )
const
56 nlohmann::json&
At(
const std::string& aPath )
61 nlohmann::json&
operator[](
const nlohmann::json::json_pointer& aPointer )
63 return nlohmann::json::operator[]( aPointer );
73 nlohmann::json::json_pointer root(
"" );
74 this->nlohmann::json::operator[]( root ) = aOther.nlohmann::json::operator[]( root );
nlohmann::json & At(const std::string &aPath)
static nlohmann::json::json_pointer PointerFromString(std::string aPath)
Builds a JSON pointer based on a given string.
nlohmann::json & operator[](const std::string &aPath)
JSON_SETTINGS_INTERNALS()
nlohmann::json & operator[](const nlohmann::json::json_pointer &aPointer)
nlohmann::json m_original
void SetFromString(const std::string &aPath, ValueType aVal)
void CloneFrom(const JSON_SETTINGS_INTERNALS &aOther)
ValueType Get(const std::string &aPath) const