21#ifndef KICAD_SYMBOL_ASYNC_LOADER_H
22#define KICAD_SYMBOL_ASYNC_LOADER_H
27#include <unordered_map>
50 std::unordered_map<wxString, std::vector<LIB_SYMBOL*>>* aOutput =
nullptr,
72 typedef std::pair<wxString, std::vector<LIB_SYMBOL*>>
LOADED_PAIR;
76 std::vector<LOADED_PAIR>
worker();
88 std::unordered_map<wxString, std::vector<LIB_SYMBOL*>>*
m_output;
98 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>
bool Done()
Returns a string containing any errors generated during the load.
std::vector< std::future< std::vector< LOADED_PAIR > > > m_returns
const wxString & GetErrors() const
Represents a pair of <nickname, loaded parts list>
void Start()
Spins up threads to load all the libraries in m_nicknames.
std::unordered_map< wxString, std::vector< LIB_SYMBOL * > > * m_output
Progress reporter (may be null)
bool m_onlyPowerSymbols
Handle to map that will be filled with the loaded parts per library.
bool Join()
Finalizes the threads and combines the output into the target output map.
SYMBOL_LIB_TABLE * m_table
True if we are loading only power symbols.
PROGRESS_REPORTER * m_reporter
std::pair< wxString, std::vector< LIB_SYMBOL * > > LOADED_PAIR
std::vector< wxString > m_nicknames
Handle to the symbol library table being loaded into.
std::atomic< size_t > m_nextLibrary