KiCad PCB EDA Suite
|
A logical library item identifier and consists of various portions much like a URI. More...
#include <lib_id.h>
Public Member Functions | |
LIB_ID () | |
LIB_ID (const wxString &aLibraryName, const wxString &aItemName) | |
This LIB_ID ctor is a special version which ignores the parsing due to symbol names allowing '/' as a valid character. | |
int | Parse (const UTF8 &aId, bool aFix=false) |
Parse LIB_ID with the information from aId. | |
const UTF8 & | GetLibNickname () const |
Return the logical library name portion of a LIB_ID. | |
const wxString | GetUniStringLibNickname () const |
int | SetLibNickname (const UTF8 &aLibNickname) |
Override the logical library name portion of the LIB_ID to aLibNickname. | |
const UTF8 & | GetLibItemName () const |
const wxString | GetUniStringLibItemName () const |
Get strings for display messages in dialogs. | |
int | SetLibItemName (const UTF8 &aLibItemName) |
Override the library item name portion of the LIB_ID to aLibItemName. | |
UTF8 | GetSubLibraryName () const |
Some LIB_IDs can have a sub-library identifier in addition to a library nickname. | |
void | SetSubLibraryName (const UTF8 &aName) |
const wxString | GetUniStringSubLibraryName () const |
const wxString | GetFullLibraryName () const |
UTF8 | Format () const |
wxString | GetUniStringLibId () const |
bool | IsValid () const |
Check if this LID_ID is valid. | |
bool | IsLegacy () const |
void | clear () |
Clear the contents of the library nickname, library entry name. | |
bool | empty () const |
int | compare (const LIB_ID &aLibId) const |
Compare the contents of LIB_ID objects by performing a std::string comparison of the library nickname, library entry name. | |
bool | operator< (const LIB_ID &aLibId) const |
bool | operator> (const LIB_ID &aLibId) const |
bool | operator== (const LIB_ID &aLibId) const |
bool | operator!= (const LIB_ID &aLibId) const |
Static Public Member Functions | |
static UTF8 | Format (const UTF8 &aLibraryName, const UTF8 &aLibItemName) |
static int | HasIllegalChars (const UTF8 &aLibItemName) |
Examine aLibItemName for invalid LIB_ID item name characters. | |
static UTF8 | FixIllegalChars (const UTF8 &aLibItemName, bool aLib) |
Replace illegal LIB_ID item name characters with underscores '_'. | |
static unsigned | FindIllegalLibraryNameChar (const UTF8 &aLibraryName) |
Looks for characters that are illegal in library nicknames. | |
Static Protected Member Functions | |
static bool | isLegalChar (unsigned aUniChar) |
Tests whether a Unicode character is a legal LIB_ID item name character. | |
static bool | isLegalLibraryNameChar (unsigned aUniChar) |
Tests whether a Unicode character is a legal LIB_ID library nickname character. | |
Protected Attributes | |
UTF8 | m_libraryName |
The nickname of the library or empty. | |
UTF8 | m_itemName |
The name of the entry in the logical library. | |
UTF8 | m_subLibraryName |
Optional sub-library name used for grouping within a library. | |
A logical library item identifier and consists of various portions much like a URI.
It consists of of a dyad of the library nickname and the name of the item in the library This is a generic library identifier that can be used for any type of library that contains multiple named items such as footprint or symbol libraries.
Example LIB_ID string: "smt:R_0805".
LIB_ID::LIB_ID | ( | const wxString & | aLibraryName, |
const wxString & | aItemName | ||
) |
This LIB_ID ctor is a special version which ignores the parsing due to symbol names allowing '/' as a valid character.
This was causing the symbol names to be truncated at the first occurrence of '/' in the symbol name.
aLibraryName | is the library name used to look up the library item in the LIB_TABLE. |
aItemName | is the name of the library item which is not parsed by the standard LIB_ID::Parse() function. |
Definition at line 92 of file lib_id.cpp.
void LIB_ID::clear | ( | ) |
Clear the contents of the library nickname, library entry name.
Definition at line 43 of file lib_id.cpp.
References UTF8::clear(), m_itemName, m_libraryName, and m_subLibraryName.
Referenced by FOOTPRINT_PREVIEW_WIDGET::DisplayFootprint(), and Parse().
int LIB_ID::compare | ( | const LIB_ID & | aLibId | ) | const |
Compare the contents of LIB_ID objects by performing a std::string comparison of the library nickname, library entry name.
aLibId | is the LIB_ID to compare against. |
Definition at line 160 of file lib_id.cpp.
References UTF8::compare(), m_itemName, and m_libraryName.
Referenced by LIB_SYMBOL::Compare().
|
inline |
Definition at line 193 of file lib_id.h.
Referenced by BOARD_NETLIST_UPDATER::addNewFootprint(), CVPCB_ASSOCIATION_TOOL::Associate(), CVPCB_MAINFRAME::AssociateFootprint(), CVPCB_MAINFRAME::AutomaticFootprintMatching(), CVPCB_MAINFRAME::GetComponentIndices(), CMP_READER::Load(), CVPCB_MAINFRAME::readNetListAndFpFiles(), BOARD_NETLIST_UPDATER::replaceFootprint(), and DIALOG_EDIT_SYMBOLS_LIBID::setLibIdByBrowser().
|
static |
Looks for characters that are illegal in library nicknames.
aLibraryName | is the logical library name to be tested. |
Definition at line 243 of file lib_id.cpp.
References isLegalLibraryNameChar().
Referenced by PANEL_DESIGN_BLOCK_LIB_TABLE::verifyTables(), PANEL_SYM_LIB_TABLE::verifyTables(), and PANEL_FP_LIB_TABLE::verifyTables().
Replace illegal LIB_ID item name characters with underscores '_'.
aLibItemName | is the LIB_ID item name to replace illegal characters. |
aLib | True if we are checking library names, false if we are checking item names |
Definition at line 191 of file lib_id.cpp.
References isLegalChar(), isLegalLibraryNameChar(), UTF8::ubegin(), and UTF8::uend().
Referenced by AltiumToKiCadLibID(), PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler(), PANEL_FP_LIB_TABLE::browseLibrariesHandler(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), CADSTAR_SCH_ARCHIVE_LOADER::CreateLibName(), SCH_IO_ALTIUM::getLibName(), SCH_IO_EAGLE::getLibName(), loadSymbol(), Parse(), EASYEDAPRO::ShortenLibName(), and EASYEDAPRO::ToKiCadLibID().
UTF8 LIB_ID::Format | ( | ) | const |
Definition at line 118 of file lib_id.cpp.
References m_itemName, m_libraryName, and UTF8::size().
Referenced by SCH_SCREEN::AddLibSymbol(), BOARD_NETLIST_UPDATER::addNewFootprint(), CVPCB_ASSOCIATION_TOOL::Associate(), CVPCB_MAINFRAME::AssociateFootprint(), GENCAD_EXPORTER::CreateDevicesSection(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), SYMBOL_LIB::FindSymbol(), PCB_IO_KICAD_SEXPR::format(), SCH_IO_KICAD_SEXPR::Format(), COMPONENT::Format(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::GetActionDescription(), FOOTPRINT::GetFPIDAsString(), SCH_SYMBOL::GetSchSymbolLibraryName(), SCH_SYMBOL::GetSymbolIDAsString(), DIALOG_CHANGE_SYMBOLS::getSymbolReferences(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), PCB_EDIT_FRAME::LoadFootprints(), DSN::SPECCTRA_DB::makeIMAGE(), SYMBOL_CHOOSER_FRAME::OnOK(), FOOTPRINT_CHOOSER_FRAME::OnOK(), SCH_IO_ALTIUM::ParseImplementation(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction(), SCH_DRAWING_TOOLS::PlaceSymbol(), DIALOG_EXCHANGE_FOOTPRINTS::processFootprint(), CVPCB_MAINFRAME::readNetListAndFpFiles(), CVPCB_MAINFRAME::refreshAfterSymbolSearch(), BOARD_NETLIST_UPDATER::replaceFootprint(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::RESCUE_SYMBOL_LIB_TABLE_CANDIDATE(), SCH_IO_KICAD_LEGACY::saveSymbol(), SCH_IO_KICAD_SEXPR::saveSymbol(), PCB_BASE_FRAME::SelectFootprintFromLibrary(), CADSTAR_SCH_ARCHIVE_LOADER::setFootprintOnSymbol(), DIALOG_EDIT_SYMBOLS_LIBID::setLibIdByBrowser(), FOOTPRINTS_LISTBOX::SetSelectedFootprint(), SYMBOL_CANDIDATE::SYMBOL_CANDIDATE(), BOARD_NETLIST_UPDATER::testConnectivity(), DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), FOOTPRINT_CHOOSER_FRAME::Update3DView(), BOARD_NETLIST_UPDATER::UpdateNetlist(), and FOOTPRINT_EDIT_FRAME::UpdateTitle().
PARSE_ERROR | if any of the pieces are illegal. |
Definition at line 134 of file lib_id.cpp.
References _, UTF8::c_str(), checkLibNickname(), UTF8::size(), and THROW_PARSE_ERROR.
const wxString LIB_ID::GetFullLibraryName | ( | ) | const |
Definition at line 277 of file lib_id.cpp.
References m_libraryName, m_subLibraryName, and UTF8::wx_str().
Referenced by COMPONENTS_MANAGER::AddComponent(), SYMBOL_EDIT_FRAME::SetCurSymbol(), and SYMBOL_VIEWER_FRAME::SetSelectedLibrary().
|
inline |
Definition at line 102 of file lib_id.h.
Referenced by COMPONENTS_MANAGER::AddComponent(), SYMBOL_EDITOR_CONTROL::AddSymbol(), BASIC_FOOTPRINT_INFO::BASIC_FOOTPRINT_INFO(), FOOTPRINT_EDIT_FRAME::canCloseWindow(), SCH_REFERENCE::CompareLibName(), SCH_EDIT_FRAME::DeleteDesignBlockFromLibrary(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLoadWithOptionalNickname(), DESIGN_BLOCK_IO::DesignBlockSave(), DESIGN_BLOCK_LIB_TABLE::DesignBlockSave(), BOARD_INSPECTION_TOOL::DiffFootprint(), EE_INSPECTION_TOOL::DiffSymbol(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), SCH_DRAWING_TOOLS::DrawSheet(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), SYMBOL_EDIT_FRAME::DuplicateSymbol(), SCH_EDIT_FRAME::EditDesignBlockProperties(), SYMBOL_EDITOR_CONTROL::EditLibrarySymbol(), SYMBOL_EDITOR_CONTROL::EditSymbol(), PCB_EDIT_FRAME::ExchangeFootprint(), FOOTPRINT_EDIT_FRAME::ExportFootprint(), LIB_TREE_MODEL_ADAPTER::FindItem(), SYMBOL_LIBS::FindLibSymbol(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), FP_LIB_TABLE::FootprintLoadWithOptionalNickname(), PCB_IO_KICAD_SEXPR::FootprintSave(), FP_LIB_TABLE::FootprintSave(), PCB_IO_KICAD_SEXPR::format(), FOOTPRINT_INFO_GENERATOR::GenerateHtml(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), PLACE_FILE_EXPORTER::GenPositionData(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::GetActionDescription(), DESIGN_BLOCK_LIST::GetDesignBlockInfo(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), FOOTPRINT_LIST::GetFootprintInfo(), SYMBOL_EDIT_FRAME::getTargetSymbol(), guessNickname(), SYMBOL_EDITOR_CONTROL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), SYMBOL_EDIT_FRAME::IsCurrentSymbol(), PCBNEW_JOBS_HANDLER::JobExportFpSvg(), CV::kiface(), kiapi::common::LibIdToProto(), CADSTAR_PCB_ARCHIVE_LOADER::loadComponentLibrary(), PCB_IO_KICAD_LEGACY::loadFOOTPRINT(), PCB_EDIT_FRAME::LoadFootprints(), PCB_IO_KICAD_LEGACY::loadFP_SHAPE(), PCB_IO_KICAD_LEGACY::loadPAD(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_EDIT_FRAME::LoadSymbol(), SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), PCB_BASE_FRAME::OnFpChangeDebounceTimer(), FOOTPRINT_EDITOR_CONTROL::OpenDirectory(), PCB_EDIT_FRAME::OpenProjectFiles(), FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor(), PCB_IO_EAGLE::packageText(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction(), PANEL_SYMBOL_CHOOSER::populateFootprintSelector(), CVPCB_MAINFRAME::readNetListAndFpFiles(), CVPCB_MAINFRAME::readSchematicNetlist(), PCB_EDIT_FRAME::RecreateBOMFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReloadFootprint(), DIALOG_SYMBOL_REMAP::remapSymbolsToLibTable(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDIT_FRAME::Revert(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSheetAsDesignBlock(), SYMBOL_LIB_TABLE::SaveSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol(), SYMBOL_EDIT_FRAME::saveSymbolCopyAs(), SchGetDesignBlock(), SchGetLibSymbol(), PCB_BASE_FRAME::setFPWatcher(), setLibNickname(), LIB_TREE::setState(), SYMBOL_EDIT_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), PANEL_SYMBOL_CHOOSER::showFootprintFor(), ERC_TESTER::TestFootprintLinkIssues(), ERC_TESTER::TestLibSymbolIssues(), DIALOG_DESIGN_BLOCK_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_ASSOCIATIONS::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), SYMBOL_LIBRARY_MANAGER::UpdateSymbol(), and FOOTPRINT_EDIT_FRAME::UpdateTitle().
|
inline |
Return the logical library name portion of a LIB_ID.
Definition at line 87 of file lib_id.h.
Referenced by SYMBOL_EDITOR_CONTROL::AddSymbol(), BASIC_FOOTPRINT_INFO::BASIC_FOOTPRINT_INFO(), EXPORTER_STEP::buildFootprint3DShapes(), SCH_SCREENS::ChangeSymbolLibNickname(), CheckForParentalChainConflicts(), CheckSavingIntoOwnInheritance(), SCH_EDIT_FRAME::DeleteDesignBlockFromLibrary(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLoadWithOptionalNickname(), BOARD_INSPECTION_TOOL::DiffFootprint(), EE_INSPECTION_TOOL::DiffSymbol(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), SYMBOL_SAVE_AS_HANDLER::DoSave(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), SYMBOL_EDIT_FRAME::DuplicateSymbol(), SYMBOL_EDITOR_CONTROL::DuplicateSymbol(), SCH_EDIT_FRAME::EditDesignBlockProperties(), SYMBOL_EDITOR_CONTROL::EditLibrarySymbol(), SYMBOL_EDITOR_CONTROL::EditSymbol(), EXPORTER_PCB_VRML::ExportVrmlFootprint(), LIB_TREE_MODEL_ADAPTER::FindItem(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), FP_LIB_TABLE::FootprintLoadWithOptionalNickname(), FOOTPRINT_INFO_GENERATOR::GenerateHtml(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), DESIGN_BLOCK_LIST::GetDesignBlockInfo(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), FOOTPRINT_LIST::GetFootprintInfo(), SCH_SCREENS::GetLibNicknames(), LIB_SYMBOL::GetLibraryName(), FOOTPRINT_EDIT_FRAME::GetLoadedFPID(), SCH_SYMBOL::GetMsgPanelInfo(), SYMBOL_EDIT_FRAME::getTargetLib(), SYMBOL_EDIT_FRAME::getTargetSymbol(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), guessNickname(), SCH_SCREENS::HasNoFullyDefinedLibIds(), idf_export_footprint(), SYMBOL_EDITOR_CONTROL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), SYMBOL_EDIT_FRAME::IsCurrentSymbol(), CV::kiface(), SYMBOL_EDIT_FRAME::KiwayMailIn(), SYMBOL_VIEWER_FRAME::KiwayMailIn(), kiapi::common::LibIdToProto(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_EDIT_FRAME::LoadSymbol(), SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), PCB_BASE_FRAME::OnFpChangeDebounceTimer(), SYMBOL_EDITOR_CONTROL::OpenDirectory(), FOOTPRINT_EDITOR_CONTROL::OpenDirectory(), SYMBOL_EDITOR_CONTROL::OpenWithTextEditor(), FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), LIBRARY_EDITOR_CONTROL::PinLibrary(), SCH_DESIGN_BLOCK_CONTROL::PinLibrary(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), PANEL_SYMBOL_CHOOSER::populateFootprintSelector(), FOOTPRINT_EDIT_FRAME::ReloadFootprint(), FOOTPRINT_VIEWER_FRAME::ReloadFootprint(), DIALOG_SYMBOL_REMAP::remapSymbolsToLibTable(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), SYMBOL_EDIT_FRAME::Revert(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), SYMBOL_EDIT_FRAME::saveCurrentSymbol(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::SaveLibraryAs(), SCH_DESIGN_BLOCK_CONTROL::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_DESIGN_BLOCK_CONTROL::SaveSheetAsDesignBlock(), SCH_EDIT_FRAME::SaveSheetAsDesignBlock(), SYMBOL_EDIT_FRAME::saveSymbolCopyAs(), SchGetDesignBlock(), SchGetLibSymbol(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_BASE_FRAME::setFPWatcher(), setLibNickname(), LIB_TREE::setState(), SCH_BASE_FRAME::setSymWatcher(), SYMBOL_EDIT_FRAME::setupUIConditions(), PANEL_SYMBOL_CHOOSER::showFootprintFor(), ERC_TESTER::TestFootprintLinkIssues(), ERC_TESTER::TestLibSymbolIssues(), DIALOG_DESIGN_BLOCK_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_ASSOCIATIONS::TransferDataToWindow(), FOOTPRINT_EDITOR_CONTROL::tryToSaveFootprintInLibrary(), LIBRARY_EDITOR_CONTROL::UnpinLibrary(), SCH_DESIGN_BLOCK_CONTROL::UnpinLibrary(), LIB_TREE_MODEL_ADAPTER::UnpinLibrary(), LIB_TREE_NODE_ITEM::Update(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), and PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists().
|
inline |
Some LIB_IDs can have a sub-library identifier in addition to a library nickname.
This identifier is not part of the canonical LIB_ID and is not written out / parsed. It is only used for internal sorting/grouping, if present.
Definition at line 130 of file lib_id.h.
Referenced by SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), and SYMBOL_VIEWER_FRAME::SetSelectedLibrary().
|
inline |
Definition at line 148 of file lib_id.h.
References Format().
Referenced by CVPCB_ASSOCIATION_TOOL::CopyAssoc(), SCH_EDIT_FRAME::CreateArchiveLibrary(), CVPCB_ASSOCIATION_TOOL::CutAssoc(), SCH_SCREEN::getLibSymbolNameMatches(), FOOTPRINT::GetMsgPanelInfo(), SYMBOL_CANDIDATE::GetStringLibId(), SYMBOL_EDIT_FRAME::LoadSymbol(), and DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist().
|
inline |
Get strings for display messages in dialogs.
Equivalent to m_itemName.wx_str(), but more explicit when building a Unicode string in messages.
Definition at line 112 of file lib_id.h.
Referenced by SCH_SCREEN::Append(), FOOTPRINT_EDIT_FRAME::ClearModify(), SCH_EDIT_FRAME::CreateArchiveLibrary(), RESCUE_CASE_CANDIDATE::FindRescues(), RESCUE_CACHE_CANDIDATE::FindRescues(), SCH_SCREEN::getLibSymbolNameMatches(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_EDIT_FRAME::LoadSymbol(), NETLIST_EXPORTER_XML::makeSymbols(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), FOOTPRINT_EDIT_FRAME::ReloadFootprint(), SCH_SYMBOL::ResolveTextVar(), LIB_SYMBOL::ResolveTextVar(), FOOTPRINT::ResolveTextVar(), SYMBOL_EDIT_FRAME::Revert(), SYMBOL_VIEWER_FRAME::SetSelectedSymbol(), ERC_TESTER::TestFootprintFilters(), and DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist().
|
inline |
Definition at line 88 of file lib_id.h.
Referenced by FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), NETLIST_EXPORTER_XML::makeSymbols(), FOOTPRINT_EDITOR_CONTROL::NewFootprint(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), SCH_SYMBOL::ResolveTextVar(), LIB_SYMBOL::ResolveTextVar(), FOOTPRINT::ResolveTextVar(), SYMBOL_EDIT_FRAME::Save(), SYMBOL_VIEWER_FRAME::SetSelectedLibrary(), and FOOTPRINT_EDITOR_CONTROL::tryToSaveFootprintInLibrary().
|
inline |
|
static |
Examine aLibItemName for invalid LIB_ID item name characters.
aLibItemName | is the LIB_ID name to test for illegal characters. |
Definition at line 175 of file lib_id.cpp.
References isLegalChar().
Referenced by RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), and Parse().
|
inline |
Definition at line 180 of file lib_id.h.
Referenced by SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), and CVPCB_MAINFRAME::readNetListAndFpFiles().
|
staticprotected |
Tests whether a Unicode character is a legal LIB_ID item name character.
The criteria for legal LIB_ID character is as follows:
Definition at line 208 of file lib_id.cpp.
Referenced by FixIllegalChars(), and HasIllegalChars().
|
staticprotected |
Tests whether a Unicode character is a legal LIB_ID library nickname character.
Definition at line 255 of file lib_id.cpp.
Referenced by FindIllegalLibraryNameChar(), and FixIllegalChars().
|
inline |
Check if this LID_ID is valid.
A valid LIB_ID must have both the library nickname and the library item name defined.
Definition at line 172 of file lib_id.h.
Referenced by SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), CVPCB_ASSOCIATION_TOOL::Associate(), CVPCB_MAINFRAME::AssociateFootprint(), CVPCB_ASSOCIATION_TOOL::CopyAssoc(), CVPCB_ASSOCIATION_TOOL::CutAssoc(), SCH_EDIT_FRAME::DeleteDesignBlockFromLibrary(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DESIGN_BLOCK_PANE::DESIGN_BLOCK_PANE(), DESIGN_BLOCK_IO::DesignBlockSave(), DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER(), DIALOG_SYMBOL_CHOOSER::DIALOG_SYMBOL_CHOOSER(), SYMBOL_EDITOR_CONTROL::DuplicateSymbol(), SCH_EDIT_FRAME::EditDesignBlockProperties(), RESCUE_CACHE_CANDIDATE::FindRescues(), FOOTPRINT_INFO_GENERATOR::GenerateHtml(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SYMBOL_EDIT_FRAME::getTargetSymbol(), SCH_DRAWING_TOOLS::ImportSheet(), SYMBOL_EDIT_FRAME::LoadSymbol(), SCH_IO_HTTP_LIB::loadSymbolFromPart(), SCH_IO_DATABASE::loadSymbolFromRow(), PANEL_DESIGN_BLOCK_CHOOSER::onDesignBlockChosen(), PANEL_FOOTPRINT_CHOOSER::onFootprintChosen(), PANEL_FOOTPRINT_CHOOSER::onFootprintSelected(), SYMBOL_CHOOSER_FRAME::OnOK(), FOOTPRINT_CHOOSER_FRAME::OnOK(), CVPCB_MAINFRAME::OnSelectComponent(), PANEL_SYMBOL_CHOOSER::onSymbolChosen(), PANEL_SYMBOL_CHOOSER::onSymbolSelected(), CVPCB_MAINFRAME::onTextFilterChangedTimer(), SCH_BASE_FRAME::PickSymbolFromLibrary(), SCH_DRAWING_TOOLS::PlaceSymbol(), PANEL_SYMBOL_CHOOSER::populateFootprintSelector(), DIALOG_EXCHANGE_FOOTPRINTS::processMatchingFootprints(), DIALOG_CHANGE_SYMBOLS::processMatchingSymbols(), LIBRARY_EDITOR_CONTROL::regenerateLibraryTree(), PCB_BASE_FRAME::SelectFootprintFromLibrary(), DIALOG_EDIT_SYMBOLS_LIBID::setLibIdByBrowser(), PANEL_SYMBOL_CHOOSER::showFootprint(), FOOTPRINT_CHOOSER_FRAME::ShowModal(), SYMBOL_CHOOSER_FRAME::ShowModal(), LIB_TREE_MODEL_ADAPTER::ShowResults(), SYMBOL_EDIT_FRAME::SyncLibraries(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), FOOTPRINT_CHOOSER_FRAME::Update3DView(), DIALOG_CHANGE_SYMBOLS::updateFieldsList(), and FOOTPRINT_EDIT_FRAME::UpdateTitle().
|
inline |
|
inline |
|
inline |
|
inline |
int LIB_ID::Parse | ( | const UTF8 & | aId, |
bool | aFix = false |
||
) |
Parse LIB_ID with the information from aId.
A typical LIB_ID string consists of a library nickname followed by a library item name. e.g.: "smt:R_0805", or e.g.: "mylib:R_0805", or e.g.: "ttl:7400"
aId | is the string to populate the LIB_ID object. |
aFix | indicates invalid chars should be replaced with '_'. |
Definition at line 51 of file lib_id.cpp.
References clear(), UTF8::find(), FixIllegalChars(), HasIllegalChars(), UTF8::npos, SetLibItemName(), SetLibNickname(), and UTF8::substr().
Referenced by PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), AltiumToKiCadLibID(), CVPCB_ASSOCIATION_TOOL::Associate(), CVPCB_ASSOCIATION_TOOL::CopyAssoc(), CVPCB_ASSOCIATION::CVPCB_ASSOCIATION(), EasyEdaToKiCadLibID(), DESIGN_BLOCK_LIST::GetDesignBlockInfo(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), FOOTPRINT_LIST::GetFootprintInfo(), DIALOG_EXCHANGE_FOOTPRINTS::isMatch(), DIALOG_CHANGE_SYMBOLS::isMatch(), CV::kiface(), CMP_READER::Load(), PCB_IO_KICAD_LEGACY::loadAllSections(), CADSTAR_PCB_ARCHIVE_LOADER::loadComponentLibrary(), FABMASTER::loadFootprints(), SCH_IO_KICAD_LEGACY::loadSymbol(), SCH_IO_HTTP_LIB::loadSymbolFromPart(), SCH_IO_DATABASE::loadSymbolFromRow(), PCB_IO_EAGLE::makeFootprint(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), KICAD_NETLIST_PARSER::parseComponent(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), SCH_IO_KICAD_SEXPR_PARSER::parseLibSymbol(), SCH_IO_KICAD_SEXPR_PARSER::parseSchematicSymbol(), CVPCB_ASSOCIATION_TOOL::PasteAssoc(), DIALOG_EXCHANGE_FOOTPRINTS::processMatchingFootprints(), DIALOG_CHANGE_SYMBOLS::processMatchingSymbols(), SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol(), FOOTPRINT::SetFPIDAsString(), DIALOG_EDIT_SYMBOLS_LIBID::setLibIdByBrowser(), PANEL_SYMBOL_CHOOSER::showFootprint(), FOOTPRINT_CHOOSER_FRAME::ShowModal(), SYMBOL_CHOOSER_FRAME::ShowModal(), ERC_TESTER::TestFootprintFilters(), ERC_TESTER::TestFootprintLinkIssues(), EASYEDAPRO::ToKiCadLibID(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_CHANGE_SYMBOLS::updateFieldsList(), and DIALOG_EDIT_SYMBOLS_LIBID::validateLibIds().
int LIB_ID::SetLibItemName | ( | const UTF8 & | aLibItemName | ) |
Override the library item name portion of the LIB_ID to aLibItemName.
Definition at line 110 of file lib_id.cpp.
References m_itemName.
Referenced by BOOST_AUTO_TEST_CASE(), LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), LEGACY_NETLIST_READER::loadComponent(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), SCH_IO_KICAD_LEGACY::loadSymbol(), Parse(), RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), LIB_SYMBOL::SetName(), SYMBOL_VIEWER_FRAME::SetSelectedSymbol(), SYMBOL_EDIT_FRAME::SyncLibraries(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), RESCUER::UndoRescues(), and LIB_TREE_NODE_ITEM::Update().
int LIB_ID::SetLibNickname | ( | const UTF8 & | aLibNickname | ) |
Override the logical library name portion of the LIB_ID to aLibNickname.
Definition at line 99 of file lib_id.cpp.
References checkLibNickname(), and m_libraryName.
Referenced by SCH_SCREENS::ChangeSymbolLibNickname(), LIB_BUFFER::CreateBuffer(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), guessNickname(), LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), LIB_TREE_NODE_LIBRARY::LIB_TREE_NODE_LIBRARY(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_LIB_TABLE::LoadSymbolLib(), PCB_EDIT_FRAME::OpenProjectFiles(), Parse(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), setLibNickname(), SYMBOL_VIEWER_FRAME::SetSelectedLibrary(), FOOTPRINT_EDITOR_CONTROL::tryToSaveFootprintInLibrary(), and LIB_TREE_NODE_ITEM::Update().
|
inline |
Definition at line 131 of file lib_id.h.
Referenced by SCH_IO_HTTP_LIB::loadSymbolFromPart(), SCH_IO_DATABASE::loadSymbolFromRow(), and SYMBOL_VIEWER_FRAME::SetSelectedLibrary().
|
protected |
|
protected |
The nickname of the library or empty.
Definition at line 271 of file lib_id.h.
Referenced by clear(), compare(), Format(), GetFullLibraryName(), and SetLibNickname().
|
protected |
Optional sub-library name used for grouping within a library.
Definition at line 273 of file lib_id.h.
Referenced by clear(), and GetFullLibraryName().