KiCad PCB EDA Suite
project_file.cpp File Reference
#include <config_params.h>
#include <project.h>
#include <project/net_settings.h>
#include <project/project_file.h>
#include <settings/common_settings.h>
#include <settings/parameters.h>
#include <wildcards_and_files_ext.h>
#include <wx/config.h>
#include <wx/log.h>

Go to the source code of this file.

Functions

void to_json (nlohmann::json &aJson, const FILE_INFO_PAIR &aPair)
 
void from_json (const nlohmann::json &aJson, FILE_INFO_PAIR &aPair)
 

Variables

const char * traceSettings
 Flag to enable settings tracing. More...
 
const int projectFileSchemaVersion = 1
 ! Update the schema version whenever a migration is required More...
 

Function Documentation

◆ from_json()

void from_json ( const nlohmann::json aJson,
FILE_INFO_PAIR aPair 
)

Definition at line 665 of file project_file.cpp.

666 {
667  wxASSERT( aJson.is_array() && aJson.size() == 2 );
668  aPair.first = KIID( wxString( aJson[0].get<std::string>().c_str(), wxConvUTF8 ) );
669  aPair.second = wxString( aJson[1].get<std::string>().c_str(), wxConvUTF8 );
670 }
Definition: common.h:68

◆ to_json()

void to_json ( nlohmann::json aJson,
const FILE_INFO_PAIR aPair 
)

Definition at line 659 of file project_file.cpp.

660 {
661  aJson = nlohmann::json::array( { aPair.first.AsString().ToUTF8(), aPair.second.ToUTF8() } );
662 }

Variable Documentation

◆ projectFileSchemaVersion

const int projectFileSchemaVersion = 1

! Update the schema version whenever a migration is required

Definition at line 34 of file project_file.cpp.