21#ifndef KICAD_SYMBOL_ASYNC_LOADER_H
22#define KICAD_SYMBOL_ASYNC_LOADER_H
27#include <unordered_map>
51 std::unordered_map<wxString, std::vector<LIB_SYMBOL*>>* aOutput =
nullptr,
73 typedef std::pair<wxString, std::vector<LIB_SYMBOL*>>
LOADED_PAIR;
77 std::vector<LOADED_PAIR>
worker();
89 std::unordered_map<wxString, std::vector<LIB_SYMBOL*>>*
m_output;
99 std::vector<std::future<std::vector<LOADED_PAIR>>>
m_returns;
Define a library symbol object.
A progress reporter interface for use in multi-threaded environments.
std::vector< LOADED_PAIR > worker()
Worker job that loads libraries and returns a list of pairs of <nickname, loaded parts>.
std::vector< std::future< std::vector< LOADED_PAIR > > > m_returns
const wxString & GetErrors() const
void Start()
Spin up threads to load all the libraries in m_nicknames.
std::unordered_map< wxString, std::vector< LIB_SYMBOL * > > * m_output
Handle to map that will be filled with the loaded parts per library.
bool m_onlyPowerSymbols
True if we are loading only power symbols.
bool Join()
Finalize the threads and combines the output into the target output map.
SYMBOL_LIB_TABLE * m_table
Handle to the symbol library table being loaded into.
PROGRESS_REPORTER * m_reporter
Progress reporter (may be null).
std::pair< wxString, std::vector< LIB_SYMBOL * > > LOADED_PAIR
Represent a pair of <nickname, loaded parts list>.
std::vector< wxString > m_nicknames
List of libraries to load.
std::atomic< size_t > m_nextLibrary