KiCad PCB EDA Suite
|
#include <sim_lib_mgr.h>
Public Member Functions | |
SIM_LIB_MGR (const PROJECT *aPrj) | |
virtual | ~SIM_LIB_MGR ()=default |
void | SetForceFullParse () |
void | Clear () |
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 | ResolveEmbeddedLibraryPath (const wxString &aLibPath, const wxString &aRelativeLib, REPORTER &aReporter) |
Static Public Member Functions | |
static wxString | ResolveLibraryPath (const wxString &aLibraryPath, const PROJECT *aProject, REPORTER &aReporter) |
Private Attributes | |
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 38 of file sim_lib_mgr.h.
SIM_LIB_MGR::SIM_LIB_MGR | ( | const PROJECT * | aPrj | ) |
Definition at line 42 of file sim_lib_mgr.cpp.
|
virtualdefault |
void SIM_LIB_MGR::Clear | ( | ) |
Definition at line 49 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 177 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, REFERENCE_FIELD, SIM_MODEL::SetIsStoredInValue(), SCH_FIELD::SetText(), SIM_VALUE_GRAMMAR::SI, SIM_DEVICE_FIELD, SIM_DEVICE_SUBTYPE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, and VALUE_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 169 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 161 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 254 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), CreateModel(), SIM_MODEL::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 273 of file sim_lib_mgr.cpp.
References _, SIM_LIBRARY::Create(), SIM_MODEL::Create(), library, m_forceFullParse, m_libraries, m_models, m_project, 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 153 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 335 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 346 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 98 of file sim_lib_mgr.cpp.
References m_project, and ResolveLibraryPath().
Referenced by CreateModel(), and SetLibrary().
|
static |
Definition at line 56 of file sim_lib_mgr.cpp.
References _, PROJECT::AbsolutePath(), ExpandEnvVarSubstitutions(), and REPORTER::Report().
Referenced by CreateModel(), SPICE_GENERATOR_IBIS::IbisDevice(), ResolveEmbeddedLibraryPath(), and SetLibrary().
|
inline |
Definition at line 44 of file sim_lib_mgr.h.
References m_forceFullParse.
void SIM_LIB_MGR::SetLibrary | ( | const wxString & | aLibraryPath, |
REPORTER & | aReporter | ||
) |
Definition at line 128 of file sim_lib_mgr.cpp.
References _, Clear(), SIM_LIBRARY::Create(), REPORTER::HasMessageOfSeverity(), library, m_forceFullParse, m_libraries, m_project, 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 329 of file sim_lib_mgr.cpp.
References m_models.
|
private |
Definition at line 84 of file sim_lib_mgr.h.
Referenced by CreateModel(), SetForceFullParse(), and SetLibrary().
|
private |
Definition at line 85 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), GetLibraries(), and SetLibrary().
|
private |
Definition at line 86 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), GetModels(), and SetModel().
|
private |
Definition at line 83 of file sim_lib_mgr.h.
Referenced by CreateModel(), ResolveEmbeddedLibraryPath(), and SetLibrary().