25#ifndef EASYEDAPRO_IMPORT_UTILS_H_
26#define EASYEDAPRO_IMPORT_UTILS_H_
32#include <nlohmann/json_fwd.hpp>
36#define EASY_IT_CONTINUE return false
37#define EASY_IT_BREAK return true
47 bool aPcbOnly =
false,
48 bool aSchOnly =
false );
50nlohmann::json
FindJsonFile(
const wxString& aZipFileName,
const std::set<wxString>& aFileNames );
55 const wxString& aFileName,
56 std::function<
bool(
const wxString&,
const wxString&, wxInputStream& )> aCallback );
58std::vector<nlohmann::json>
ParseJsonLines( wxInputStream& aInput,
const wxString& aSource );
64 const wxString& aSource );
66std::map<wxString, wxString>
AnyMapToStringMap(
const std::map<wxString, nlohmann::json>& aInput );
A logical library item identifier and consists of various portions much like a URI.
LIB_ID ToKiCadLibID(const wxString &aLibName, const wxString &aLibReference)
void IterateZipFiles(const wxString &aFileName, std::function< bool(const wxString &, const wxString &, wxInputStream &)> aCallback)
std::vector< nlohmann::json > ParseJsonLines(wxInputStream &aInput, const wxString &aSource)
std::vector< std::vector< nlohmann::json > > ParseJsonLinesWithSeparation(wxInputStream &aInput, const wxString &aSource)
Multiple document types (e.g.
nlohmann::json FindJsonFile(const wxString &aZipFileName, const std::set< wxString > &aFileNames)
std::vector< IMPORT_PROJECT_DESC > ProjectToSelectorDialog(const nlohmann::json &aProject, bool aPcbOnly=false, bool aSchOnly=false)
nlohmann::json ReadProjectOrDeviceFile(const wxString &aZipFileName)
wxString ShortenLibName(wxString aProjectName)
std::map< wxString, wxString > AnyMapToStringMap(const std::map< wxString, nlohmann::json > &aInput)
Describes how non-KiCad boards and schematics should be imported as KiCad projects.