|
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 | SetFilesStack (std::vector< EMBEDDED_FILES * > aFilesStack) |
| void | SetLibrary (const wxString &aLibraryPath, REPORTER &aReporter) |
| SIM_MODEL & | CreateModel (SIM_MODEL::TYPE aType, std::span< const wxString > aPins, REPORTER &aReporter) |
| SIM_MODEL & | CreateModel (const SIM_MODEL *aBaseModel, std::span< const wxString > aPins, REPORTER &aReporter) |
| SIM_MODEL & | CreateModel (const SIM_MODEL *aBaseModel, std::span< const wxString > aPins, const std::vector< SCH_FIELD > &aFields, bool aResolve, int aDepth, REPORTER &aReporter) |
| SIM_LIBRARY::MODEL | CreateModel (const SIM_MODEL_INPUT &aInput, bool aAllowRawFallback, REPORTER &aReporter) |
| Raw-SPICE fallback applies to field-defined models; library parsing keeps its own policy. | |
| SIM_LIBRARY::MODEL | CreateModel (const SCH_SHEET_PATH *aSheetPath, const SCH_SYMBOL &aSymbol, bool aResolve, int aDepth, const wxString &aVariantName, REPORTER &aReporter, const wxString &aMergedSimPins=wxEmptyString) |
| SIM_LIBRARY::MODEL | CreateModel (const std::vector< SCH_FIELD > &aFields, bool aResolve, int aDepth, std::span< const wxString > aPins, REPORTER &aReporter) |
| SIM_LIBRARY::MODEL | CreateModel (const wxString &aLibraryPath, const std::string &aBaseModelName, const std::vector< SCH_FIELD > &aFields, bool aResolve, int aDepth, std::span< const wxString > 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) |
Static Public Member Functions | |
| static SIM_MODEL_INPUT | CaptureModelInput (const SCH_SHEET_PATH *aSheetPath, const SCH_SYMBOL &aSymbol, int aDepth, const wxString &aVariantName, const wxString &aMergedSimPins=wxEmptyString) |
| Resolve instance fields once; editors use the field-based overloads for unresolved input. | |
Private Member Functions | |
| SIM_LIBRARY::MODEL | createModel (const std::vector< SCH_FIELD > &aFields, bool aResolve, int aDepth, std::span< const wxString > aPins, REPORTER &aReporter, bool aAllowRawFallback) |
Private Attributes | |
| std::vector< EMBEDDED_FILES * > | m_embeddedFilesStack |
| 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 35 of file sim_lib_mgr.h.
| SIM_LIB_MGR::SIM_LIB_MGR | ( | const PROJECT * | aPrj | ) |
Definition at line 40 of file sim_lib_mgr.cpp.
References m_forceFullParse, and m_project.
|
virtualdefault |
|
static |
Resolve instance fields once; editors use the field-based overloads for unresolved input.
Definition at line 199 of file sim_lib_mgr.cpp.
References SIM_MODEL_INPUT::fields, FOR_NETNAME, SCH_SYMBOL::GetAllLibPins(), SCH_SYMBOL::GetFields(), SCH_SYMBOL::GetPins(), SCH_SYMBOL::GetPrefix(), SCH_SYMBOL::GetRef(), SIM_MODEL_INPUT::inferencePins, SIM_MODEL_INPUT::modelPins, SIM_MODEL::PinNumbers(), SIM_MODEL_INPUT::prefix, REFERENCE, SIM_PINS_FIELD, and VALUE.
Referenced by BOOST_AUTO_TEST_CASE(), and CreateModel().
| void SIM_LIB_MGR::Clear | ( | ) |
Definition at line 47 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, |
| const SCH_SYMBOL & | aSymbol, | ||
| bool | aResolve, | ||
| int | aDepth, | ||
| const wxString & | aVariantName, | ||
| REPORTER & | aReporter, | ||
| const wxString & | aMergedSimPins = wxEmptyString ) |
Definition at line 230 of file sim_lib_mgr.cpp.
References CaptureModelInput(), and CreateModel().
| SIM_MODEL & SIM_LIB_MGR::CreateModel | ( | const SIM_MODEL * | aBaseModel, |
| std::span< const wxString > | aPins, | ||
| const std::vector< SCH_FIELD > & | aFields, | ||
| bool | aResolve, | ||
| int | aDepth, | ||
| REPORTER & | aReporter ) |
Definition at line 190 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
| SIM_MODEL & SIM_LIB_MGR::CreateModel | ( | const SIM_MODEL * | aBaseModel, |
| std::span< const wxString > | aPins, | ||
| REPORTER & | aReporter ) |
Definition at line 182 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
| SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const SIM_MODEL_INPUT & | aInput, |
| bool | aAllowRawFallback, | ||
| REPORTER & | aReporter ) |
Raw-SPICE fallback applies to field-defined models; library parsing keeps its own policy.
Definition at line 239 of file sim_lib_mgr.cpp.
References createModel(), SIM_MODEL_INPUT::fields, FindField(), SIM_MODEL_INPUT::inferencePins, SIM_MODEL::InferSimModel(), model, SIM_MODEL_INPUT::modelPins, name, SIM_MODEL_INPUT::prefix, SIM_VALUE_GRAMMAR::SI, SIM_DEVICE_FIELD, SIM_DEVICE_SUBTYPE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, and USER.
| SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const std::vector< SCH_FIELD > & | aFields, |
| bool | aResolve, | ||
| int | aDepth, | ||
| std::span< const wxString > | aPins, | ||
| REPORTER & | aReporter ) |
Definition at line 289 of file sim_lib_mgr.cpp.
References createModel().
| SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel | ( | const wxString & | aLibraryPath, |
| const std::string & | aBaseModelName, | ||
| const std::vector< SCH_FIELD > & | aFields, | ||
| bool | aResolve, | ||
| int | aDepth, | ||
| std::span< const wxString > | aPins, | ||
| REPORTER & | aReporter ) |
Definition at line 317 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, |
| std::span< const wxString > | aPins, | ||
| REPORTER & | aReporter ) |
Definition at line 174 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), and m_models.
Referenced by BOOST_AUTO_TEST_CASE(), CreateModel(), createModel(), SIM_MODEL::MigrateSimModel(), SCH_FIELD::OnScintillaCharAdded(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_SYMBOL::ResolveTextVar(), SCH_EDITOR_CONTROL::SimProbe(), ERC_TESTER::TestSimModelIssues(), and SIMULATOR_FRAME_UI::UpdateTunerValue().
|
private |
Definition at line 298 of file sim_lib_mgr.cpp.
References SIM_MODEL::Create(), CreateModel(), GetFieldValue(), SIM_LIBRARY::LIBRARY_FIELD, m_models, and SIM_LIBRARY::NAME_FIELD.
Referenced by CreateModel(), and CreateModel().
| std::map< wxString, std::reference_wrapper< const SIM_LIBRARY > > SIM_LIB_MGR::GetLibraries | ( | ) | const |
Definition at line 380 of file sim_lib_mgr.cpp.
References library, m_libraries, and path.
| std::vector< std::reference_wrapper< SIM_MODEL > > SIM_LIB_MGR::GetModels | ( | ) | const |
Definition at line 391 of file sim_lib_mgr.cpp.
| wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath | ( | const wxString & | aLibPath, |
| const wxString & | aRelativeLib, | ||
| REPORTER & | aReporter ) |
Definition at line 119 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 54 of file sim_lib_mgr.cpp.
References _, ExpandEnvVarSubstitutions(), m_embeddedFilesStack, m_project, REPORTER::Report(), and resolver.
Referenced by CreateModel(), SPICE_GENERATOR_IBIS::IbisDevice(), ResolveEmbeddedLibraryPath(), and SetLibrary().
|
inline |
Definition at line 45 of file sim_lib_mgr.h.
References m_embeddedFilesStack.
Referenced by SPICE_GENERATOR_IBIS::IbisDevice(), SIM_MODEL::MigrateSimModel(), SCH_FIELD::OnScintillaCharAdded(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_SYMBOL::ResolveTextVar(), SCH_EDITOR_CONTROL::SimProbe(), and SIMULATOR_FRAME_UI::UpdateTunerValue().
|
inline |
Definition at line 41 of file sim_lib_mgr.h.
References m_forceFullParse.
| void SIM_LIB_MGR::SetLibrary | ( | const wxString & | aLibraryPath, |
| REPORTER & | aReporter ) |
Definition at line 149 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 374 of file sim_lib_mgr.cpp.
References m_models.
|
private |
Definition at line 98 of file sim_lib_mgr.h.
Referenced by ResolveLibraryPath(), and SetFilesStack().
|
private |
Definition at line 100 of file sim_lib_mgr.h.
Referenced by CreateModel(), SetForceFullParse(), SetLibrary(), and SIM_LIB_MGR().
|
private |
Definition at line 101 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), GetLibraries(), and SetLibrary().
|
private |
Definition at line 102 of file sim_lib_mgr.h.
Referenced by Clear(), CreateModel(), CreateModel(), CreateModel(), CreateModel(), createModel(), GetModels(), and SetModel().
|
private |
Definition at line 99 of file sim_lib_mgr.h.
Referenced by ResolveLibraryPath(), and SIM_LIB_MGR().