|
KiCad PCB EDA Suite
|
#include <qa_utils/utility_registry.h>#include <chrono>#include <iostream>#include <set>#include <string>#include <vector>#include <fmt/format.h>#include <wx/cmdline.h>#include <wx/msgout.h>#include <common.h>#include <core/profile.h>#include <ki_exception.h>#include <libraries/library_table.h>#include <lib_symbol.h>#include <paths.h>#include <project.h>#include <richio.h>#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.h>#include <settings/common_settings.h>#include <settings/settings_manager.h>#include <symbol_library_common.h>#include <wx_filename.h>Go to the source code of this file.
Typedefs | |
| using | PARSE_DURATION = std::chrono::microseconds |
Enumerations | |
| enum | LIB_PARSER_RET_CODES { PARSE_FAILED = KI_TEST::RET_CODES::TOOL_SPECIFIC } |
Functions | |
| static void | loadKiCadEnvVars () |
| Load the KiCad common settings and set any configured environment variables (e.g. | |
| static int | parseLibraryFile (const wxString &aPath, bool aVerbose) |
| Parse a single library file path and return the number of symbols loaded. | |
| static bool | parseStdin () |
| Parse symbol library content from stdin (for fuzzing). | |
| static int | parseLibTable (const wxString &aTablePath, bool aVerbose, std::set< wxString > &aVisited) |
| Load libraries from a symbol library table file. | |
| int | lib_parser_main_func (int argc, char **argv) |
Variables | |
| static const wxCmdLineEntryDesc | g_cmdLineDesc [] |
| static bool | registered |
| using PARSE_DURATION = std::chrono::microseconds |
Definition at line 48 of file lib_parser.cpp.
| enum LIB_PARSER_RET_CODES |
| Enumerator | |
|---|---|
| PARSE_FAILED | |
Definition at line 308 of file lib_parser.cpp.
| int lib_parser_main_func | ( | int | argc, |
| char ** | argv ) |
Definition at line 314 of file lib_parser.cpp.
References KI_TEST::BAD_CMDLINE, g_cmdLineDesc, loadKiCadEnvVars(), KI_TEST::OK, PARSE_FAILED, parseLibraryFile(), parseLibTable(), parseStdin(), path, and PROJECT_VAR_NAME.
|
static |
Load the KiCad common settings and set any configured environment variables (e.g.
KICAD10_SYMBOL_DIR) so that library table URI references like ${KICAD10_SYMBOL_DIR}/Device.kicad_sym can be resolved.
Definition at line 56 of file lib_parser.cpp.
References SETTINGS_MANAGER::GetCommonSettings(), SETTINGS_MANAGER::Load(), COMMON_SETTINGS::m_Env, name, and COMMON_SETTINGS::ENVIRONMENT::vars.
Referenced by lib_parser_main_func().
|
static |
Parse a single library file path and return the number of symbols loaded.
Definition at line 86 of file lib_parser.cpp.
References SCH_IO_KICAD_SEXPR::EnumerateSymbolLib(), PROF_TIMER::SinceStart(), and IO_ERROR::What().
Referenced by lib_parser_main_func(), and parseLibTable().
|
static |
Load libraries from a symbol library table file.
| aVisited | set of already-visited table paths |
Definition at line 179 of file lib_parser.cpp.
References ExpandEnvVarSubstitutions(), parseLibraryFile(), parseLibTable(), PROJECT, WX_FILENAME::ResolvePossibleSymlinks(), SYMBOL, table, and LIBRARY_TABLE_ROW::TABLE_TYPE_NAME.
Referenced by lib_parser_main_func(), and parseLibTable().
|
static |
Parse symbol library content from stdin (for fuzzing).
Definition at line 140 of file lib_parser.cpp.
References SCH_IO_KICAD_SEXPR_PARSER::ParseLib().
Referenced by lib_parser_main_func().
|
static |
Definition at line 265 of file lib_parser.cpp.
|
static |
Definition at line 421 of file lib_parser.cpp.