KiCad PCB EDA Suite
|
#include <design_block_info_impl.h>
Public Member Functions | |
DESIGN_BLOCK_LIST_IMPL () | |
virtual | ~DESIGN_BLOCK_LIST_IMPL () |
bool | ReadDesignBlockFiles (DESIGN_BLOCK_LIB_TABLE *aTable, const wxString *aNickname=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr) override |
Read all the design blocks provided by the combination of aTable and aNickname. | |
unsigned | GetCount () const |
const std::vector< std::unique_ptr< DESIGN_BLOCK_INFO > > & | GetList () const |
Was forced to add this by modview_frame.cpp. | |
void | Clear () |
DESIGN_BLOCK_INFO * | GetDesignBlockInfo (const wxString &aDesignBlockName) |
Get info for a design block by id. | |
DESIGN_BLOCK_INFO * | GetDesignBlockInfo (const wxString &aLibNickname, const wxString &aDesignBlockName) |
Get info for a design block by libNickname/designBlockName. | |
DESIGN_BLOCK_INFO & | GetItem (unsigned aIdx) const |
Get info for a design block by index. | |
unsigned | GetErrorCount () const |
std::unique_ptr< IO_ERROR > | PopError () |
DESIGN_BLOCK_LIB_TABLE * | GetTable () const |
Protected Member Functions | |
void | loadDesignBlocks () |
Protected Attributes | |
DESIGN_BLOCK_LIB_TABLE * | m_lib_table = nullptr |
no ownership | |
std::vector< std::unique_ptr< DESIGN_BLOCK_INFO > > | m_list |
SYNC_QUEUE< std::unique_ptr< IO_ERROR > > | m_errors |
some can be PARSE_ERRORs also | |
Private Member Functions | |
bool | CatchErrors (const std::function< void()> &aFunc) |
Call aFunc, pushing any IO_ERRORs and std::exceptions it throws onto m_errors. | |
Private Attributes | |
SYNC_QUEUE< wxString > | m_queue |
long long | m_list_timestamp |
PROGRESS_REPORTER * | m_progress_reporter |
std::atomic_bool | m_cancelled |
std::mutex | m_join |
Definition at line 80 of file design_block_info_impl.h.
DESIGN_BLOCK_LIST_IMPL::DESIGN_BLOCK_LIST_IMPL | ( | ) |
Definition at line 234 of file design_block_info_impl.cpp.
|
inlinevirtual |
Definition at line 84 of file design_block_info_impl.h.
|
private |
Call aFunc, pushing any IO_ERRORs and std::exceptions it throws onto m_errors.
Definition at line 59 of file design_block_info_impl.cpp.
References DESIGN_BLOCK_LIST::m_errors, SYNC_QUEUE< T >::move_push(), and THROW_IO_ERROR.
Referenced by loadDesignBlocks(), and ReadDesignBlockFiles().
|
inlineinherited |
Definition at line 156 of file design_block_info.h.
|
inlineinherited |
Definition at line 148 of file design_block_info.h.
|
inherited |
Get info for a design block by id.
Definition at line 57 of file design_block_info.cpp.
References DESIGN_BLOCK_LIST::GetDesignBlockInfo(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), and LIB_ID::Parse().
Referenced by DESIGN_BLOCK_LIST::GetDesignBlockInfo(), and PANEL_DESIGN_BLOCK_CHOOSER::rebuildHistoryNode().
|
inherited |
Get info for a design block by libNickname/designBlockName.
Definition at line 41 of file design_block_info.cpp.
References DESIGN_BLOCK_LIST::m_list.
|
inlineinherited |
Definition at line 177 of file design_block_info.h.
|
inlineinherited |
Get info for a design block by index.
aIdx | index of the given item. |
Definition at line 175 of file design_block_info.h.
|
inlineinherited |
Was forced to add this by modview_frame.cpp.
Definition at line 151 of file design_block_info.h.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::getDesignBlocks().
|
inlineinherited |
Definition at line 203 of file design_block_info.h.
Referenced by DESIGN_BLOCK_INFO_IMPL::load().
|
protected |
Definition at line 152 of file design_block_info_impl.cpp.
References PROGRESS_REPORTER::AdvanceProgress(), CatchErrors(), DESIGN_BLOCK_LIB_TABLE::DesignBlockEnumerate(), GetKiCadThreadPool(), PROGRESS_REPORTER::KeepRefreshing(), m_cancelled, DESIGN_BLOCK_LIST::m_lib_table, DESIGN_BLOCK_LIST::m_list, m_progress_reporter, m_queue, SYNC_QUEUE< T >::move_push(), SYNC_QUEUE< T >::pop(), SYNC_QUEUE< T >::size(), and tp.
Referenced by ReadDesignBlockFiles().
|
inlineinherited |
Definition at line 179 of file design_block_info.h.
|
overridevirtual |
Read all the design blocks 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 design blocks from all known libraries in aTable. |
aProgressReporter | is an optional progress reporter. ReadDesignBlockFiles() will use 2 phases within the reporter. |
Implements DESIGN_BLOCK_LIST.
Definition at line 90 of file design_block_info_impl.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), CatchErrors(), SYNC_QUEUE< T >::clear(), SYNC_QUEUE< T >::empty(), DESIGN_BLOCK_LIB_TABLE::GenerateTimestamp(), LIB_TABLE::GetLogicalLibs(), loadDesignBlocks(), m_cancelled, DESIGN_BLOCK_LIST::m_errors, DESIGN_BLOCK_LIST::m_lib_table, DESIGN_BLOCK_LIST::m_list, m_list_timestamp, m_progress_reporter, m_queue, SYNC_QUEUE< T >::push(), PROGRESS_REPORTER::Report(), PROGRESS_REPORTER::SetMaxProgress(), and SYNC_QUEUE< T >::size().
Referenced by PANEL_DESIGN_BLOCK_CHOOSER::PANEL_DESIGN_BLOCK_CHOOSER(), and PANEL_DESIGN_BLOCK_CHOOSER::RefreshLibs().
|
private |
Definition at line 104 of file design_block_info_impl.h.
Referenced by loadDesignBlocks(), and ReadDesignBlockFiles().
|
protectedinherited |
some can be PARSE_ERRORs also
Definition at line 209 of file design_block_info.h.
Referenced by CatchErrors(), and ReadDesignBlockFiles().
|
private |
Definition at line 105 of file design_block_info_impl.h.
|
protectedinherited |
no ownership
Definition at line 206 of file design_block_info.h.
Referenced by loadDesignBlocks(), and ReadDesignBlockFiles().
|
protectedinherited |
Definition at line 208 of file design_block_info.h.
Referenced by DESIGN_BLOCK_LIST::GetDesignBlockInfo(), loadDesignBlocks(), and ReadDesignBlockFiles().
|
private |
Definition at line 102 of file design_block_info_impl.h.
Referenced by ReadDesignBlockFiles().
|
private |
Definition at line 103 of file design_block_info_impl.h.
Referenced by loadDesignBlocks(), and ReadDesignBlockFiles().
|
private |
Definition at line 101 of file design_block_info_impl.h.
Referenced by loadDesignBlocks(), and ReadDesignBlockFiles().