KiCad PCB EDA Suite
json_settings.cpp File Reference
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <utility>
#include <sstream>
#include <locale_io.h>
#include <gal/color4d.h>
#include <settings/json_settings.h>
#include <settings/json_settings_internals.h>
#include <settings/nested_settings.h>
#include <settings/parameters.h>
#include <wx/config.h>
#include <wx/debug.h>
#include <wx/fileconf.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/stdstream.h>
#include <wx/wfstream.h>

Go to the source code of this file.

Functions

template OPT< std::string > JSON_SETTINGS::Get< std::string > (const std::string &aPath) const
 
template OPT< nlohmann::jsonJSON_SETTINGS::Get< nlohmann::json > (const std::string &aPath) const
 
template OPT< KIGFX::COLOR4DJSON_SETTINGS::Get< KIGFX::COLOR4D > (const std::string &aPath) const
 
template void JSON_SETTINGS::Set< std::string > (const std::string &aPath, std::string aValue)
 
template void JSON_SETTINGS::Set< nlohmann::json > (const std::string &aPath, nlohmann::json aValue)
 
template void JSON_SETTINGS::Set< KIGFX::COLOR4D > (const std::string &aPath, KIGFX::COLOR4D aValue)
 
void to_json (nlohmann::json &aJson, const wxString &aString)
 
void from_json (const nlohmann::json &aJson, wxString &aString)
 

Variables

const wxChar *const traceSettings = wxT( "KICAD_SETTINGS" )
 Flag to enable debug output of settings operations and management. More...
 

Function Documentation

◆ from_json()

void from_json ( const nlohmann::json aJson,
wxString &  aString 
)

Definition at line 795 of file json_settings.cpp.

796 {
797  aString = wxString( aJson.get<std::string>().c_str(), wxConvUTF8 );
798 }

◆ JSON_SETTINGS::Get< KIGFX::COLOR4D >()

template OPT<KIGFX::COLOR4D> JSON_SETTINGS::Get< KIGFX::COLOR4D > ( const std::string &  aPath) const

◆ JSON_SETTINGS::Get< nlohmann::json >()

template OPT<nlohmann::json> JSON_SETTINGS::Get< nlohmann::json > ( const std::string &  aPath) const

◆ JSON_SETTINGS::Get< std::string >()

template OPT<std::string> JSON_SETTINGS::Get< std::string > ( const std::string &  aPath) const

◆ JSON_SETTINGS::Set< KIGFX::COLOR4D >()

template void JSON_SETTINGS::Set< KIGFX::COLOR4D > ( const std::string &  aPath,
KIGFX::COLOR4D  aValue 
)

◆ JSON_SETTINGS::Set< nlohmann::json >()

template void JSON_SETTINGS::Set< nlohmann::json > ( const std::string &  aPath,
nlohmann::json  aValue 
)

◆ JSON_SETTINGS::Set< std::string >()

template void JSON_SETTINGS::Set< std::string > ( const std::string &  aPath,
std::string  aValue 
)

◆ to_json()

void to_json ( nlohmann::json aJson,
const wxString &  aString 
)

Definition at line 789 of file json_settings.cpp.

790 {
791  aJson = aString.ToUTF8();
792 }