KiCad PCB EDA Suite
Loading...
Searching...
No Matches
import_local_symbol_libs.h File Reference
#include <vector>
#include <wx/string.h>

Go to the source code of this file.

Functions

std::vector< wxString > RegisterLocalSymbolLibraries (PROJECT &aProject, const wxString &aSourceProjectDir, const std::vector< wxString > &aLibraries, REPORTER &aReporter)
 Register the symbol libraries a source project names in the project symbol library table.
 

Function Documentation

◆ RegisterLocalSymbolLibraries()

std::vector< wxString > RegisterLocalSymbolLibraries ( PROJECT & aProject,
const wxString & aSourceProjectDir,
const std::vector< wxString > & aLibraries,
REPORTER & aReporter )

Register the symbol libraries a source project names in the project symbol library table.

A library inside aSourceProjectDir is copied into the project and referenced relative to it; any other library keeps its absolute path. A nickname the table already holds is left alone.

Shared by the project manager's import mail handler and the kicad-cli import job.

Parameters
[in]aProjectis the project whose table receives the rows.
[in]aSourceProjectDiris the directory of the source project.
[in]aLibrariesare the absolute paths of the libraries to register.
[in]aReporterreceives table save errors.
Returns
the nicknames of the rows that were added.

Definition at line 36 of file import_local_symbol_libs.cpp.

References _, LIBRARY_MANAGER::AbortAsyncLoads(), PGM_BASE::GetLibraryManager(), PROJECT::GetProjectPath(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), SYMBOL_LIBRARY_ADAPTER::LoadOne(), LIBRARY_MANAGER::LoadProjectTables(), LIBRARY_ERROR::message, Pgm(), PROJECT, REPORTER::Report(), RPT_SEVERITY_ERROR, LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), SCH_IO_MGR::ShowType(), SYMBOL, PROJECT_SCH::SymbolLibAdapter(), LIBRARY_MANAGER::Table(), and table.

Referenced by SCH_EDIT_FRAME::KiwayMailIn().