KiCad PCB EDA Suite
|
Holds a list of FOOTPRINT_INFO objects, along with a list of IO_ERRORs or PARSE_ERRORs that were thrown acquiring the FOOTPRINT_INFOs. More...
#include <footprint_info.h>
Public Member Functions | |
FOOTPRINT_LIST () | |
virtual | ~FOOTPRINT_LIST () |
virtual void | WriteCacheToFile (const wxString &aFilePath) |
virtual void | ReadCacheFromFile (const wxString &aFilePath) |
unsigned | GetCount () const |
const std::vector< std::unique_ptr< FOOTPRINT_INFO > > & | GetList () const |
Was forced to add this by modview_frame.cpp. | |
virtual void | Clear ()=0 |
FOOTPRINT_INFO * | GetFootprintInfo (const wxString &aFootprintName) |
Get info for a footprint by id. | |
FOOTPRINT_INFO * | GetFootprintInfo (const wxString &aLibNickname, const wxString &aFootprintName) |
Get info for a footprint by libNickname/footprintName. | |
FOOTPRINT_INFO & | GetItem (unsigned aIdx) const |
Get info for a footprint by index. | |
unsigned | GetErrorCount () const |
std::unique_ptr< IO_ERROR > | PopError () |
virtual bool | ReadFootprintFiles (FP_LIB_TABLE *aTable, const wxString *aNickname=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)=0 |
Read all the footprints provided by the combination of aTable and aNickname. | |
void | DisplayErrors (wxTopLevelWindow *aCaller=nullptr) |
FP_LIB_TABLE * | GetTable () const |
Static Public Member Functions | |
static FOOTPRINT_LIST * | GetInstance (KIWAY &aKiway) |
Factory function to return a FOOTPRINT_LIST via Kiway. | |
Protected Attributes | |
FP_LIB_TABLE * | m_lib_table |
no ownership | |
std::vector< std::unique_ptr< FOOTPRINT_INFO > > | m_list |
SYNC_QUEUE< std::unique_ptr< IO_ERROR > > | m_errors |
some can be PARSE_ERRORs also | |
Holds a list of FOOTPRINT_INFO objects, along with a list of IO_ERRORs or PARSE_ERRORs that were thrown acquiring the FOOTPRINT_INFOs.
This is a virtual class; its implementation lives in pcbnew/footprint_info_impl.cpp. To get instances of these classes, see FOOTPRINT_LIST::GetInstance().
Definition at line 160 of file footprint_info.h.
|
inline |
Definition at line 163 of file footprint_info.h.
|
inlinevirtual |
Definition at line 168 of file footprint_info.h.
|
pure virtual |
Implemented in FOOTPRINT_LIST_IMPL.
void FOOTPRINT_LIST::DisplayErrors | ( | wxTopLevelWindow * | aCaller = nullptr | ) |
Definition at line 113 of file footprint_info.cpp.
References _, HTML_MESSAGE_BOX::AddHTML_Text(), EscapeHTML(), HTML_MESSAGE_BOX::MessageSet(), and PopError().
Referenced by FOOTPRINT_EDIT_FRAME::initLibraryTree(), CVPCB_MAINFRAME::LoadFootprintFiles(), and PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
|
inline |
Definition at line 178 of file footprint_info.h.
Referenced by FOOTPRINT_FILTER::ITERATOR::dereference(), FOOTPRINT_FILTER::end(), GetInstance(), FOOTPRINT_FILTER::ITERATOR::increment(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), FOOTPRINT_SELECT_WIDGET::Load(), and PCB_EDIT_FRAME::OpenProjectFiles().
|
inline |
Definition at line 216 of file footprint_info.h.
Referenced by FOOTPRINT_EDIT_FRAME::initLibraryTree(), CVPCB_MAINFRAME::LoadFootprintFiles(), and PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
FOOTPRINT_INFO * FOOTPRINT_LIST::GetFootprintInfo | ( | const wxString & | aFootprintName | ) |
Get info for a footprint by id.
Definition at line 59 of file footprint_info.cpp.
References GetFootprintInfo(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), and LIB_ID::Parse().
Referenced by CVPCB_MAINFRAME::AssociateFootprint(), CVPCB_MAINFRAME::AutomaticFootprintMatching(), CVPCB_MAINFRAME::DisplayStatus(), GetFootprintInfo(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), and CVPCB_MAINFRAME::readNetListAndFpFiles().
FOOTPRINT_INFO * FOOTPRINT_LIST::GetFootprintInfo | ( | const wxString & | aLibNickname, |
const wxString & | aFootprintName | ||
) |
Get info for a footprint by libNickname/footprintName.
Definition at line 43 of file footprint_info.cpp.
References m_list.
|
static |
Factory function to return a FOOTPRINT_LIST via Kiway.
This is not guaranteed to succeed and will return null if the kiface is not available.
aKiway | active kiway instance. |
Definition at line 163 of file footprint_info.cpp.
References get_instance_from_id(), GetCount(), PROJECT::GetProjectPath(), KIFACE_FOOTPRINT_LIST, KIWAY::Prj(), and ReadCacheFromFile().
Referenced by PANEL_SYMBOL_CHOOSER::constructRightPanel(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), FOOTPRINT_SELECT_WIDGET::Load(), and FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList().
|
inline |
Get info for a footprint by index.
aIdx | index of the given item. |
Definition at line 211 of file footprint_info.h.
Referenced by FOOTPRINT_FILTER::ITERATOR::increment().
|
inline |
Was forced to add this by modview_frame.cpp.
Definition at line 184 of file footprint_info.h.
Referenced by FP_TREE_MODEL_ADAPTER::getFootprints().
|
inline |
Definition at line 246 of file footprint_info.h.
Referenced by FOOTPRINT_INFO_IMPL::load().
|
inline |
Definition at line 221 of file footprint_info.h.
Referenced by DisplayErrors().
|
inlinevirtual |
Reimplemented in FOOTPRINT_LIST_IMPL.
Definition at line 173 of file footprint_info.h.
Referenced by GetInstance().
|
pure virtual |
Read all the footprints provided by the combination of aTable and aNickname.
aTable | defines all the libraries. |
aNickname | is the library to read from, or if NULL means read all footprints from all known libraries in aTable. |
aProgressReporter | is an optional progress reporter. ReadFootprintFiles() will use 2 phases within the reporter. |
Implemented in FOOTPRINT_LIST_IMPL.
Referenced by CVPCB_MAINFRAME::LoadFootprintFiles().
|
inlinevirtual |
Reimplemented in FOOTPRINT_LIST_IMPL.
Definition at line 172 of file footprint_info.h.
|
protected |
some can be PARSE_ERRORs also
Definition at line 264 of file footprint_info.h.
Referenced by FOOTPRINT_LIST_IMPL::CatchErrors(), and FOOTPRINT_LIST_IMPL::ReadFootprintFiles().
|
protected |
no ownership
Definition at line 261 of file footprint_info.h.
Referenced by FOOTPRINT_LIST_IMPL::loadFootprints(), FOOTPRINT_LIST_IMPL::loadLibs(), and FOOTPRINT_LIST_IMPL::ReadFootprintFiles().
|
protected |
Definition at line 263 of file footprint_info.h.
Referenced by FOOTPRINT_LIST_IMPL::Clear(), GetFootprintInfo(), FOOTPRINT_FILTER::ITERATOR::increment(), FOOTPRINT_LIST_IMPL::loadFootprints(), FOOTPRINT_LIST_IMPL::ReadCacheFromFile(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), and FOOTPRINT_LIST_IMPL::WriteCacheToFile().