KiCad PCB EDA Suite
|
#include <sim_lib_mgr.h>
Public Member Functions | |
SIM_LIB_MGR (const PROJECT *aPrj, EMBEDDED_FILES *aFiles) | |
virtual | ~SIM_LIB_MGR ()=default |
void | SetForceFullParse () |
void | Clear () |
void | SetFiles (EMBEDDED_FILES *aFiles) |
void | SetLibrary (const wxString &aLibraryPath, REPORTER &aReporter) |
SIM_MODEL & | CreateModel (SIM_MODEL::TYPE aType, const std::vector< SCH_PIN * > &aPins, REPORTER &aReporter) |
SIM_MODEL & | CreateModel (const SIM_MODEL *aBaseModel, const std::vector< SCH_PIN * > &aPins, REPORTER &aReporter) |
SIM_MODEL & | CreateModel (const SIM_MODEL *aBaseModel, const std::vector< SCH_PIN * > &aPins, const std::vector< SCH_FIELD > &aFields, REPORTER &aReporter) |
SIM_LIBRARY::MODEL | CreateModel (const SCH_SHEET_PATH *aSheetPath, SCH_SYMBOL &aSymbol, REPORTER &aReporter) |
SIM_LIBRARY::MODEL | CreateModel (const std::vector< SCH_FIELD > &aFields, const std::vector< SCH_PIN * > &aPins, bool aResolved, REPORTER &aReporter) |
SIM_LIBRARY::MODEL | CreateModel (const wxString &aLibraryPath, const std::string &aBaseModelName, const std::vector< SCH_FIELD > &aFields, const std::vector< SCH_PIN * > &aPins, REPORTER &aReporter) |
void | SetModel (int aIndex, std::unique_ptr< SIM_MODEL > aModel) |
std::map< wxString, std::reference_wrapper< const SIM_LIBRARY > > | GetLibraries () const |
std::vector< std::reference_wrapper< SIM_MODEL > > | GetModels () const |
wxString | ResolveLibraryPath (const wxString &aLibraryPath, REPORTER &aReporter) |
wxString | ResolveEmbeddedLibraryPath (const wxString &aLibPath, const wxString &aRelativeLib, REPORTER &aReporter) |
Private Attributes | |
EMBEDDED_FILES * | m_files |
const PROJECT * | m_project |
bool | m_forceFullParse |
std::map< wxString, std::unique_ptr< SIM_LIBRARY > > | m_libraries |
std::vector< std::unique_ptr< SIM_MODEL > > | m_models |
Definition at line 39 of file sim_lib_mgr.h.
SIM_LIB_MGR::SIM_LIB_MGR | ( | const PROJECT * | aPrj, |
EMBEDDED_FILES * | aFiles | ||
) |
Definition at line 44 of file sim_lib_mgr.cpp.
|
virtualdefault |
void SIM_LIB_MGR::Clear | ( | ) |
Definition at line 52 of file sim_lib_mgr.cpp.
References m_libraries, and m_models.
Referenced by SetLibrary().
SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const SCH_SHEET_PATH * | aSheetPath, |
SCH_SYMBOL & | aSymbol, | ||
REPORTER & | aReporter | ||
) |
Definition at line 180 of file sim_lib_mgr.cpp.
References CreateModel(), SCH_SYMBOL::GetAllLibPins(), SCH_SYMBOL::GetFields(), SCH_SYMBOL::GetRef(), SIM_MODEL::InferSimModel(), SIM_LIBRARY::MODEL::model, name, SIM_MODEL::SetIsStoredInValue(), SCH_FIELD::SetText(), SIM_VALUE_GRAMMAR::SI, SIM_DEVICE_FIELD, SIM_DEVICE_SUBTYPE_FIELD, SIM_PARAMS_FIELD, and SIM_PINS_FIELD.
SIM_MODEL & SIM_LIB_MGR::CreateModel | ( | const SIM_MODEL * | aBaseModel, |
const std::vector< SCH_PIN * > & | aPins, | ||
const std::vector< SCH_FIELD > & | aFields, | ||
REPORTER & | aReporter | ||
) |
Definition at line 172 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
SIM_MODEL & SIM_LIB_MGR::CreateModel | ( | const SIM_MODEL * | aBaseModel, |
const std::vector< SCH_PIN * > & | aPins, | ||
REPORTER & | aReporter | ||
) |
Definition at line 164 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const std::vector< SCH_FIELD > & | aFields, |
const std::vector< SCH_PIN * > & | aPins, | ||
bool | aResolved, | ||
REPORTER & | aReporter | ||
) |
Definition at line 256 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), CreateModel(), GetFieldValue(), SIM_LIBRARY::LIBRARY_FIELD, m_models, and SIM_LIBRARY::NAME_FIELD.
SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const wxString & | aLibraryPath, |
const std::string & | aBaseModelName, | ||
const std::vector< SCH_FIELD > & | aFields, | ||
const std::vector< SCH_PIN * > & | aPins, | ||
REPORTER & | aReporter | ||
) |
Definition at line 275 of file sim_lib_mgr.cpp.
References _, SIM_LIBRARY::Create(), SIM_MODEL::Create(), library, m_forceFullParse, m_libraries, m_models, SIM_LIBRARY::NAME_FIELD, path, REPORTER::Report(), ResolveEmbeddedLibraryPath(), ResolveLibraryPath(), and RPT_SEVERITY_ERROR.
SIM_MODEL & SIM_LIB_MGR::CreateModel | ( | SIM_MODEL::TYPE | aType, |
const std::vector< SCH_PIN * > & | aPins, | ||
REPORTER & | aReporter | ||
) |
Definition at line 156 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
Referenced by CreateModel(), SIM_MODEL::MigrateSimModel(), SCH_FIELD::OnScintillaCharAdded(), NETLIST_EXPORTER_SPICE::readModel(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_SYMBOL::ResolveTextVar(), SCH_EDITOR_CONTROL::SimProbe(), ERC_TESTER::TestSimModelIssues(), and SIMULATOR_FRAME_UI::UpdateTunerValue().
std::map< wxString, std::reference_wrapper< const SIM_LIBRARY > > SIM_LIB_MGR::GetLibraries | ( | ) | const |
Definition at line 337 of file sim_lib_mgr.cpp.
References library, m_libraries, and path.
Referenced by NETLIST_EXPORTER_SPICE::writeIncludes().
std::vector< std::reference_wrapper< SIM_MODEL > > SIM_LIB_MGR::GetModels | ( | ) | const |
Definition at line 348 of file sim_lib_mgr.cpp.
References m_models.
wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath | ( | const wxString & | aLibPath, |
const wxString & | aRelativeLib, | ||
REPORTER & | aReporter | ||
) |
Definition at line 101 of file sim_lib_mgr.cpp.
References ResolveLibraryPath().
Referenced by CreateModel(), and SetLibrary().
wxString SIM_LIB_MGR::ResolveLibraryPath | ( | const wxString & | aLibraryPath, |
REPORTER & | aReporter | ||
) |
Definition at line 59 of file sim_lib_mgr.cpp.
References _, PROJECT::AbsolutePath(), m_files, m_project, REPORTER::Report(), FILENAME_RESOLVER::ResolvePath(), resolver, and FILENAME_RESOLVER::SetProject().
Referenced by CreateModel(), SPICE_GENERATOR_IBIS::IbisDevice(), ResolveEmbeddedLibraryPath(), and SetLibrary().
|
inline |
Definition at line 49 of file sim_lib_mgr.h.
References m_files.
Referenced by DIALOG_SIM_MODEL< T >::DIALOG_SIM_MODEL(), and SIM_MODEL::MigrateSimModel().
|
inline |
Definition at line 45 of file sim_lib_mgr.h.
References m_forceFullParse.
void SIM_LIB_MGR::SetLibrary | ( | const wxString & | aLibraryPath, |
REPORTER & | aReporter | ||
) |
Definition at line 131 of file sim_lib_mgr.cpp.
References _, Clear(), SIM_LIBRARY::Create(), REPORTER::HasMessageOfSeverity(), library, m_forceFullParse, m_libraries, path, REPORTER::Report(), ResolveEmbeddedLibraryPath(), ResolveLibraryPath(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_UNDEFINED.
void SIM_LIB_MGR::SetModel | ( | int | aIndex, |
std::unique_ptr< SIM_MODEL > | aModel | ||
) |
Definition at line 331 of file sim_lib_mgr.cpp.
References m_models.
|
private |
Definition at line 86 of file sim_lib_mgr.h.
Referenced by ResolveLibraryPath(), and SetFiles().
|
private |
Definition at line 88 of file sim_lib_mgr.h.
Referenced by CreateModel(), SetForceFullParse(), and SetLibrary().
|
private |
Definition at line 89 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), GetLibraries(), and SetLibrary().
|
private |
Definition at line 90 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), GetModels(), and SetModel().
|
private |
Definition at line 87 of file sim_lib_mgr.h.
Referenced by ResolveLibraryPath().