KiCad PCB EDA Suite
|
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname. More...
#include <lib_table_base.h>
Public Member Functions | |
virtual void | Parse (LIB_TABLE_LEXER *aLexer)=0 |
Parse the #LIB_TABLE_LEXER s-expression library table format into the appropriate LIB_TABLE_ROW objects. | |
virtual void | Format (OUTPUTFORMATTER *aOutput, int aIndentLevel) const =0 |
Generate the table in s-expression format to aOutput with an indentation level of aIndentLevel. | |
LIB_TABLE (LIB_TABLE *aFallBackTable=nullptr, std::unique_ptr< LIB_TABLE_IO > aTableIo=nullptr) | |
Build a library table by pre-pending this table fragment in front of aFallBackTable. | |
virtual | ~LIB_TABLE () |
bool | operator== (const LIB_TABLE &r) const |
Compares this table against another. | |
bool | operator!= (const LIB_TABLE &r) const |
unsigned | GetCount () const |
Get the number of rows contained in the table. | |
LIB_TABLE_ROW & | At (unsigned aIndex) |
Get the 'n'th LIB_TABLE_ROW object. | |
const LIB_TABLE_ROW & | At (unsigned aIndex) const |
Get the 'n'th LIB_TABLE_ROW object. | |
bool | IsEmpty (bool aIncludeFallback=true) |
Return true if the table is empty. | |
const wxString | GetDescription (const wxString &aNickname) |
bool | HasLibrary (const wxString &aNickname, bool aCheckEnabled=false) const |
Test for the existence of aNickname in the library table. | |
bool | HasLibraryWithPath (const wxString &aPath) const |
Test for the existence of aPath in the library table. | |
std::vector< wxString > | GetLogicalLibs () |
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE. | |
wxString | GetFullURI (const wxString &aLibNickname, bool aExpandEnvVars=true) const |
Return the full URI of the library mapped to aLibNickname. | |
bool | InsertRow (LIB_TABLE_ROW *aRow, bool doReplace=false) |
Adds aRow if it does not already exist or if doReplace is true. | |
bool | RemoveRow (const LIB_TABLE_ROW *aRow) |
Removes a row from the table and frees the pointer. | |
bool | ReplaceRow (size_t aIndex, LIB_TABLE_ROW *aRow) |
Replaces the Nth row with the given new row. | |
bool | ChangeRowOrder (size_t aIndex, int aOffset) |
Moves a row within the table. | |
void | TransferRows (LIB_TABLE_ROWS &aRowsList) |
Takes ownership of another list of rows; the original list will be freed. | |
const LIB_TABLE_ROW * | FindRowByURI (const wxString &aURI) |
void | Load (const wxString &aFileName) |
Load the library table using the path defined by aFileName aFallBackTable. | |
void | Save (const wxString &aFileName) const |
Write this library table to aFileName in s-expression form. | |
int | GetVersion () const |
Returns the version number (0 if unset) | |
virtual PROJECT::ELEM | ProjectElementType ()=0 |
Static Public Member Functions | |
static std::map< std::string, UTF8 > * | ParseOptions (const std::string &aOptionsList) |
Parses aOptionsList and places the result into a #PROPERTIES object which is returned. | |
static UTF8 | FormatOptions (const std::map< std::string, UTF8 > *aProperties) |
Returns a list of options from the aProperties parameter. | |
Protected Member Functions | |
void | clear () |
LIB_TABLE_ROW * | findRow (const wxString &aNickname, bool aCheckIfEnabled=false) const |
Return a LIB_TABLE_ROW if aNickname is found in this table or in any chained fallBack table fragment, else NULL. | |
bool | doInsertRow (LIB_TABLE_ROW *aRow, bool doReplace=false) |
Performs the mechanics of inserting a row, but without locking or reindexing. | |
bool | migrate () |
Updates the env vars from older version of KiCad, provided they do not currently resolve to anything. | |
void | reindex () |
Protected Attributes | |
std::unique_ptr< LIB_TABLE_IO > | m_io |
LIB_TABLE * | m_fallBack |
int | m_version |
Versioning to handle importing old tables. | |
LIB_TABLE_ROWS | m_rows |
Owning set of rows. | |
std::map< wxString, LIB_TABLE_ROWS_ITER > | m_rowsMap |
this is a non-owning index into the LIB_TABLE_ROWS table | |
std::shared_mutex | m_mutex |
Mutex to protect access to the rows vector. | |
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.
This class owns the library table, which is like fstab in concept and maps logical library name to the library URI, type, and options. It is heavily based on the SWEET parser work done by Dick Hollenbeck and can be seen in new/sch_lib_table.h. A library table has the following columns:
The Library Type can be one of:
For now, the Library URI types needed to support the various types can be one of those shown below, which are typical of each type:
The library table is built up from several additive entries (table fragments), and the final table is a (conceptual) merging of the table fragments. Two anticipated sources of the entries are a personal table saved in the KiCad configuration and a project resident table that resides in project file. The project footprint table entries are considered a higher priority in the final dynamically assembled library table. An row in the project file contribution to the library table takes precedence over the personal table if there is a collision of logical library names. Otherwise, the entries simply combine without issue to make up the applicable library table.
Definition at line 354 of file lib_table_base.h.
LIB_TABLE::LIB_TABLE | ( | LIB_TABLE * | aFallBackTable = nullptr , |
std::unique_ptr< LIB_TABLE_IO > | aTableIo = nullptr |
||
) |
Build a library table by pre-pending this table fragment in front of aFallBackTable.
Loading of this table fragment is done by using Parse().
aFallBackTable | is another LIB_TABLE which is searched only when a row is not found in this table. No ownership is taken of aFallBackTable. |
aTableIo | is the I/O object to use for the table data. nullptr means use the default file-based I/O. |
Definition at line 166 of file lib_table_base.cpp.
References m_io.
|
virtual |
Definition at line 180 of file lib_table_base.cpp.
|
inline |
Get the 'n'th LIB_TABLE_ROW object.
aIndex | index of row (must exist: from 0 to GetCount() - 1) |
Definition at line 435 of file lib_table_base.h.
Referenced by DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), DESIGN_BLOCK_GRID_TRICKS::paste_text(), SYMBOL_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), and PCB::IFACE::SaveFileAs().
|
inline |
Get the 'n'th LIB_TABLE_ROW object.
aIndex | index of row (must exist: from 0 to GetCount() - 1) |
Definition at line 443 of file lib_table_base.h.
bool LIB_TABLE::ChangeRowOrder | ( | size_t | aIndex, |
int | aOffset | ||
) |
Moves a row within the table.
aIndex | is the current index of the row to move |
aOffset | is the number of positions to move it by in the table |
Definition at line 435 of file lib_table_base.cpp.
References m_mutex, m_rows, and reindex().
Referenced by PANEL_SYM_LIB_TABLE::moveDownHandler(), and PANEL_SYM_LIB_TABLE::moveUpHandler().
|
protected |
Definition at line 186 of file lib_table_base.cpp.
References m_rows, and m_rowsMap.
Referenced by Load(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), and TransferRows().
|
protected |
Performs the mechanics of inserting a row, but without locking or reindexing.
Definition at line 361 of file lib_table_base.cpp.
References LIB_TABLE_ROW::GetNickName(), m_rows, m_rowsMap, reindex(), and LIB_TABLE_ROW::SetParent().
Referenced by InsertRow(), SYMBOL_LIB_TABLE::Parse(), DESIGN_BLOCK_LIB_TABLE::Parse(), and FP_LIB_TABLE::Parse().
|
protected |
Return a LIB_TABLE_ROW if aNickname is found in this table or in any chained fallBack table fragment, else NULL.
aNickname | is the name of the library table entry to find. |
aCheckIfEnabled | is a flag to check if the library table entry is enabled. |
Definition at line 250 of file lib_table_base.cpp.
References LIB_TABLE_ROW::GetIsEnabled(), m_fallBack, m_mutex, and m_rowsMap.
Referenced by SYMBOL_LIB_TABLE::FindRow(), DESIGN_BLOCK_LIB_TABLE::FindRow(), FP_LIB_TABLE::FindRow(), GetDescription(), GetFullURI(), and HasLibrary().
const LIB_TABLE_ROW * LIB_TABLE::FindRowByURI | ( | const wxString & | aURI | ) |
Definition at line 293 of file lib_table_base.cpp.
References m_fallBack, m_io, and m_rows.
Referenced by PCB_EDIT_FRAME::ExportFootprintsToLibrary(), SYMBOL_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), and DIALOG_SYMBOL_REMAP::remapSymbolToLibTable().
|
pure virtual |
Generate the table in s-expression format to aOutput with an indentation level of aIndentLevel.
aOutput | is the OUTPUTFORMATTER to format the table into. |
aIndentLevel | is the indentation level (2 spaces) to indent. |
IO_ERROR | if an I/O error occurs during output. |
boost::interprocess::lock_except | if separate process attempt to access the table. |
Implemented in SYMBOL_LIB_TABLE, DESIGN_BLOCK_LIB_TABLE, and FP_LIB_TABLE.
Referenced by Save().
Returns a list of options from the aProperties parameter.
The name=value pairs will be separated with the '|' character. The =value portion may not be present. You might expect something like "name1=value1|name2=value2|flag_me". Notice that flag_me does not have a value. This is ok.
aProperties | is the PROPERTIES to format or NULL. If NULL the returned string will be empty. |
Definition at line 606 of file lib_table_base.cpp.
References UTF8::begin(), UTF8::end(), name, OPT_SEP, and UTF8::size().
Referenced by DIALOG_PLUGIN_OPTIONS::TransferDataFromWindow().
|
inline |
Get the number of rows contained in the table.
Definition at line 425 of file lib_table_base.h.
Referenced by FP_TREE_SYNCHRONIZING_ADAPTER::GetLibrariesCount(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), DESIGN_BLOCK_GRID_TRICKS::paste_text(), SYMBOL_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), and PCB::IFACE::SaveFileAs().
const wxString LIB_TABLE::GetDescription | ( | const wxString & | aNickname | ) |
Definition at line 202 of file lib_table_base.cpp.
References findRow(), and LIB_TABLE_ROW::GetDescr().
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), SAVE_AS_DIALOG::SAVE_AS_DIALOG(), and PCB_BASE_FRAME::SelectLibrary().
wxString LIB_TABLE::GetFullURI | ( | const wxString & | aLibNickname, |
bool | aExpandEnvVars = true |
||
) | const |
Return the full URI of the library mapped to aLibNickname.
Definition at line 237 of file lib_table_base.cpp.
References findRow(), and LIB_TABLE_ROW::GetFullURI().
Referenced by CVPCB_MAINFRAME::DisplayStatus(), SCH_EDIT_FRAME::LoadSheetFromFile(), NETLIST_EXPORTER_XML::makeLibraries(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), and SYMBOL_EDIT_FRAME::saveLibrary().
std::vector< wxString > LIB_TABLE::GetLogicalLibs | ( | ) |
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE.
Definition at line 314 of file lib_table_base.cpp.
References LIB_TABLE_ROW::GetIsEnabled(), LIB_TABLE_ROW::GetNickName(), m_fallBack, and m_rows.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), CVPCB_MAINFRAME::BuildLibrariesList(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLoadWithOptionalNickname(), FP_LIB_TABLE::FootprintLoadWithOptionalNickname(), DESIGN_BLOCK_LIB_TABLE::GenerateTimestamp(), FP_LIB_TABLE::GenerateTimestamp(), GetFootprintLibraries(), SYMBOL_LIBRARY_MANAGER::GetLibraryCount(), SYMBOL_LIB_TABLE::GetModifyHash(), guessNickname(), SYMBOL_VIEWER_FRAME::loadAllLibraries(), CVPCB_MAINFRAME::LoadFootprintFiles(), SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SAVE_AS_DIALOG::SAVE_AS_DIALOG(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), and FP_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
inline |
Returns the version number (0 if unset)
Definition at line 585 of file lib_table_base.h.
bool LIB_TABLE::HasLibrary | ( | const wxString & | aNickname, |
bool | aCheckEnabled = false |
||
) | const |
Test for the existence of aNickname in the library table.
aCheckEnabled | if true will only return true for enabled libraries |
Definition at line 214 of file lib_table_base.cpp.
References findRow().
Referenced by SYMBOL_EDIT_FRAME::addLibTableEntry(), BOARD_INSPECTION_TOOL::DiffFootprint(), EE_INSPECTION_TOOL::DiffSymbol(), CVPCB_MAINFRAME::DisplayStatus(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), CV::kiface(), SYMBOL_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), SYMBOL_LIBRARY_MANAGER::LibraryExists(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_EASYEDAPRO::LoadSchematicFile(), SCH_EDIT_FRAME::LoadSheetFromFile(), NETLIST_EXPORTER_XML::makeLibraries(), PCM_DESIGN_BLOCK_LIB_TRAVERSER::OnDir(), PCM_FP_LIB_TRAVERSER::OnDir(), PCM_SYM_LIB_TRAVERSER::OnFile(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), SYMBOL_EDIT_FRAME::saveLibrary(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), ERC_TESTER::TestLibSymbolIssues(), and SCH_SCREEN::UpdateSymbolLinks().
bool LIB_TABLE::HasLibraryWithPath | ( | const wxString & | aPath | ) | const |
Test for the existence of aPath in the library table.
aCheckEnabled | if true will only return true for enabled libraries |
Definition at line 225 of file lib_table_base.cpp.
References m_rows.
Referenced by PCM_DESIGN_BLOCK_LIB_TRAVERSER::OnDir(), PCM_FP_LIB_TRAVERSER::OnDir(), and PCM_SYM_LIB_TRAVERSER::OnFile().
bool LIB_TABLE::InsertRow | ( | LIB_TABLE_ROW * | aRow, |
bool | doReplace = false |
||
) |
Adds aRow if it does not already exist or if doReplace is true.
If doReplace is not true and the key for aRow already exists, the function fails and returns false.
The key for the table is the nickName, and all in this table must be unique.
aRow | is the new row to insert, or to forcibly add if doReplace is true. |
doReplace | if true, means insert regardless of whether aRow's key already exists. If false, then fail if the key already exists. |
Definition at line 350 of file lib_table_base.cpp.
References doInsertRow(), m_mutex, and reindex().
Referenced by SCH_EDIT_FRAME::AddDesignBlockLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_EASYEDAPRO::LoadSchematicFile(), SCH_EDIT_FRAME::LoadSheetFromFile(), PCM_DESIGN_BLOCK_LIB_TRAVERSER::OnDir(), PCM_FP_LIB_TRAVERSER::OnDir(), PCM_SYM_LIB_TRAVERSER::OnFile(), PCB_EDIT_FRAME::OpenProjectFiles(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
bool LIB_TABLE::IsEmpty | ( | bool | aIncludeFallback = true | ) |
Return true if the table is empty.
aIncludeFallback | is used to determine if the fallback table should be included in the test. |
Definition at line 193 of file lib_table_base.cpp.
References IsEmpty(), m_fallBack, and m_rows.
Referenced by DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), IsEmpty(), and SCH_EDIT_FRAME::LoadSheetFromFile().
void LIB_TABLE::Load | ( | const wxString & | aFileName | ) |
Load the library table using the path defined by aFileName aFallBackTable.
aFileName | contains the full path to the s-expression file. |
IO_ERROR | if an error occurs attempting to load the footprint library table. |
Definition at line 504 of file lib_table_base.cpp.
References clear(), m_io, m_mutex, m_version, migrate(), Parse(), reindex(), and Save().
Referenced by PROJECT::DesignBlockLibs(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), SCH_EDIT_FRAME::LoadSheetFromFile(), PROJECT::PcbFootprintLibs(), PROJECT_PCB::PcbFootprintLibs(), PCB::IFACE::SaveFileAs(), PROJECT_SCH::SchSymbolLibTable(), DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::TransferDataFromWindow(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow(), DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow(), and WriteDRCReport().
|
protected |
Updates the env vars from older version of KiCad, provided they do not currently resolve to anything.
Definition at line 479 of file lib_table_base.cpp.
References m_rows.
Referenced by Load().
|
inline |
Definition at line 420 of file lib_table_base.h.
|
inline |
Compares this table against another.
This compares the row contents against each other. Any fallback tables are not checked.
Definition at line 404 of file lib_table_base.h.
References m_rows.
|
pure virtual |
Parse the #LIB_TABLE_LEXER s-expression library table format into the appropriate LIB_TABLE_ROW objects.
aLexer | is the lexer to parse. |
IO_ERROR | if an I/O error occurs during parsing. |
PARSER_ERROR | if the lexer format to parse is invalid. |
boost::bad_pointer | if an any attempt to add an invalid pointer to the boost::ptr_vector. |
boost::bad_index | if an index outside the row table bounds is accessed. |
Implemented in SYMBOL_LIB_TABLE, DESIGN_BLOCK_LIB_TABLE, and FP_LIB_TABLE.
Referenced by Load().
|
static |
Parses aOptionsList and places the result into a #PROPERTIES object which is returned.
If the options field is empty, then the returned PROPERTIES will be a NULL pointer.
Typically aOptionsList comes from the "options" field within a LIB_TABLE_ROW and the format is simply a comma separated list of name value pairs. e.g.: [name1[=value1][|name2[=value2]]] etc. When using the UI to create or edit a library table, this formatting is handled for you.
Definition at line 541 of file lib_table_base.cpp.
Referenced by PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries(), PANEL_DESIGN_BLOCK_LIB_TABLE::onMigrateLibraries(), PANEL_FP_LIB_TABLE::onMigrateLibraries(), LIB_TABLE_ROW::SetOptions(), and DIALOG_PLUGIN_OPTIONS::TransferDataToWindow().
|
pure virtualinherited |
Implemented in S3D_CACHE, SYMBOL_LIB_TABLE, SYMBOL_LIBS, DESIGN_BLOCK_LIB_TABLE, FP_LIB_TABLE, and SEARCH_STACK.
|
protected |
Definition at line 467 of file lib_table_base.cpp.
References m_rows, and m_rowsMap.
Referenced by ChangeRowOrder(), doInsertRow(), InsertRow(), Load(), RemoveRow(), ReplaceRow(), and TransferRows().
bool LIB_TABLE::RemoveRow | ( | const LIB_TABLE_ROW * | aRow | ) |
Removes a row from the table and frees the pointer.
aRow | is the row to remove |
Definition at line 383 of file lib_table_base.cpp.
References LIB_TABLE_ROW::GetNickName(), m_mutex, m_rows, m_rowsMap, and reindex().
Referenced by SYMBOL_LIBRARY_MANAGER::addLibrary(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), and SYMBOL_LIB_TABLE::LoadGlobalTable().
bool LIB_TABLE::ReplaceRow | ( | size_t | aIndex, |
LIB_TABLE_ROW * | aRow | ||
) |
Replaces the Nth row with the given new row.
Definition at line 420 of file lib_table_base.cpp.
References m_mutex, m_rows, m_rowsMap, and reindex().
Referenced by SYMBOL_GRID_TRICKS::paste_text().
void LIB_TABLE::Save | ( | const wxString & | aFileName | ) | const |
Write this library table to aFileName in s-expression form.
aFileName | is the name of the file to write to. |
Definition at line 526 of file lib_table_base.cpp.
References _, Format(), m_io, m_version, and THROW_IO_ERROR.
Referenced by SCH_EDIT_FRAME::AddDesignBlockLibrary(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), InvokeEditDesignBlockLibTable(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), Load(), SCH::IFACE::loadGlobalDesignBlockLibTable(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), SCH_EDIT_FRAME::LoadSheetFromFile(), PCB_EDIT_FRAME::OpenProjectFiles(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), PCB::IFACE::SaveFileAs(), SCH_BASE_FRAME::saveSymbolLibTables(), DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::TransferDataFromWindow(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow(), DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
void LIB_TABLE::TransferRows | ( | LIB_TABLE_ROWS & | aRowsList | ) |
Takes ownership of another list of rows; the original list will be freed.
Definition at line 456 of file lib_table_base.cpp.
References clear(), m_mutex, m_rows, and reindex().
Referenced by PANEL_DESIGN_BLOCK_LIB_TABLE::TransferDataFromWindow(), PANEL_SYM_LIB_TABLE::TransferDataFromWindow(), and PANEL_FP_LIB_TABLE::TransferDataFromWindow().
|
protected |
Definition at line 628 of file lib_table_base.h.
Referenced by findRow(), FindRowByURI(), GetLogicalLibs(), and IsEmpty().
|
protected |
Definition at line 626 of file lib_table_base.h.
Referenced by FindRowByURI(), LIB_TABLE(), Load(), and Save().
|
mutableprotected |
Mutex to protect access to the rows vector.
Definition at line 642 of file lib_table_base.h.
Referenced by ChangeRowOrder(), findRow(), InsertRow(), Load(), RemoveRow(), ReplaceRow(), and TransferRows().
|
protected |
Owning set of rows.
Definition at line 636 of file lib_table_base.h.
Referenced by DESIGN_BLOCK_LIB_TABLE_GRID::at(), SYMBOL_LIB_TABLE_GRID::at(), FP_LIB_TABLE_GRID::at(), DESIGN_BLOCK_LIB_TABLE_GRID::begin(), SYMBOL_LIB_TABLE_GRID::begin(), FP_LIB_TABLE_GRID::begin(), ChangeRowOrder(), clear(), DESIGN_BLOCK_LIB_TABLE_GRID::DESIGN_BLOCK_LIB_TABLE_GRID(), doInsertRow(), DESIGN_BLOCK_LIB_TABLE_GRID::erase(), SYMBOL_LIB_TABLE_GRID::erase(), FP_LIB_TABLE_GRID::erase(), FindRowByURI(), SYMBOL_LIB_TABLE::Format(), DESIGN_BLOCK_LIB_TABLE::Format(), FP_LIB_TABLE::Format(), FP_LIB_TABLE_GRID::FP_LIB_TABLE_GRID(), GetLogicalLibs(), HasLibraryWithPath(), DESIGN_BLOCK_LIB_TABLE_GRID::insert(), SYMBOL_LIB_TABLE_GRID::insert(), FP_LIB_TABLE_GRID::insert(), IsEmpty(), migrate(), PANEL_DESIGN_BLOCK_LIB_TABLE::moveDownHandler(), PANEL_SYM_LIB_TABLE::moveDownHandler(), PANEL_FP_LIB_TABLE::moveDownHandler(), PANEL_DESIGN_BLOCK_LIB_TABLE::moveUpHandler(), PANEL_FP_LIB_TABLE::moveUpHandler(), DESIGN_BLOCK_LIB_TABLE::operator==(), FP_LIB_TABLE::operator==(), operator==(), SYMBOL_LIB_TABLE::operator==(), DESIGN_BLOCK_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), DESIGN_BLOCK_LIB_TABLE_GRID::push_back(), SYMBOL_LIB_TABLE_GRID::push_back(), FP_LIB_TABLE_GRID::push_back(), reindex(), RemoveRow(), ReplaceRow(), DESIGN_BLOCK_LIB_TABLE_GRID::size(), SYMBOL_LIB_TABLE_GRID::size(), FP_LIB_TABLE_GRID::size(), SYMBOL_LIB_TABLE_GRID::SYMBOL_LIB_TABLE_GRID(), and TransferRows().
|
protected |
this is a non-owning index into the LIB_TABLE_ROWS table
Definition at line 639 of file lib_table_base.h.
Referenced by clear(), doInsertRow(), findRow(), reindex(), RemoveRow(), and ReplaceRow().
|
mutableprotected |
Versioning to handle importing old tables.
Definition at line 631 of file lib_table_base.h.
Referenced by SYMBOL_LIB_TABLE::Format(), DESIGN_BLOCK_LIB_TABLE::Format(), FP_LIB_TABLE::Format(), Load(), SYMBOL_LIB_TABLE::Parse(), DESIGN_BLOCK_LIB_TABLE::Parse(), FP_LIB_TABLE::Parse(), and Save().