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 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 571 of file project_file.cpp.

572 {
573  wxASSERT( aJson.is_array() && aJson.size() == 2 );
574  aPair.first = KIID( wxString( aJson[0].get<std::string>().c_str(), wxConvUTF8 ) );
575  aPair.second = wxString( aJson[1].get<std::string>().c_str(), wxConvUTF8 );
576 }
Definition: kiid.h:44

◆ to_json()

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

Definition at line 565 of file project_file.cpp.

566 {
567  aJson = nlohmann::json::array( { aPair.first.AsString().ToUTF8(), aPair.second.ToUTF8() } );
568 }

Variable Documentation

◆ projectFileSchemaVersion

const int projectFileSchemaVersion = 1

! Update the schema version whenever a migration is required

Definition at line 33 of file project_file.cpp.