KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SIM_LIB_MGR Class Reference

#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_MODELCreateModel (SIM_MODEL::TYPE aType, std::span< const wxString > aPins, REPORTER &aReporter)
 
SIM_MODELCreateModel (const SIM_MODEL *aBaseModel, std::span< const wxString > aPins, REPORTER &aReporter)
 
SIM_MODELCreateModel (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 PROJECTm_project
 
bool m_forceFullParse
 
std::map< wxString, std::unique_ptr< SIM_LIBRARY > > m_libraries
 
std::vector< std::unique_ptr< SIM_MODEL > > m_models
 

Detailed Description

Definition at line 35 of file sim_lib_mgr.h.

Constructor & Destructor Documentation

◆ SIM_LIB_MGR()

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.

◆ ~SIM_LIB_MGR()

virtual SIM_LIB_MGR::~SIM_LIB_MGR ( )
virtualdefault

Member Function Documentation

◆ CaptureModelInput()

SIM_MODEL_INPUT SIM_LIB_MGR::CaptureModelInput ( const SCH_SHEET_PATH * aSheetPath,
const SCH_SYMBOL & aSymbol,
int aDepth,
const wxString & aVariantName,
const wxString & aMergedSimPins = wxEmptyString )
static

◆ Clear()

void SIM_LIB_MGR::Clear ( )

Definition at line 47 of file sim_lib_mgr.cpp.

References m_libraries, and m_models.

Referenced by SetLibrary().

◆ CreateModel() [1/7]

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().

◆ CreateModel() [2/7]

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.

◆ CreateModel() [3/7]

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.

◆ CreateModel() [4/7]

SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel ( const SIM_MODEL_INPUT & aInput,
bool aAllowRawFallback,
REPORTER & aReporter )

◆ CreateModel() [5/7]

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().

◆ CreateModel() [6/7]

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 )

◆ CreateModel() [7/7]

◆ createModel()

SIM_LIBRARY::MODEL SIM_LIB_MGR::createModel ( const std::vector< SCH_FIELD > & aFields,
bool aResolve,
int aDepth,
std::span< const wxString > aPins,
REPORTER & aReporter,
bool aAllowRawFallback )
private

◆ GetLibraries()

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.

◆ GetModels()

std::vector< std::reference_wrapper< SIM_MODEL > > SIM_LIB_MGR::GetModels ( ) const

Definition at line 391 of file sim_lib_mgr.cpp.

References m_models, and model.

◆ ResolveEmbeddedLibraryPath()

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().

◆ ResolveLibraryPath()

wxString SIM_LIB_MGR::ResolveLibraryPath ( const wxString & aLibraryPath,
REPORTER & aReporter )

◆ SetFilesStack()

◆ SetForceFullParse()

void SIM_LIB_MGR::SetForceFullParse ( )
inline

Definition at line 41 of file sim_lib_mgr.h.

References m_forceFullParse.

◆ SetLibrary()

◆ SetModel()

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.

Member Data Documentation

◆ m_embeddedFilesStack

std::vector<EMBEDDED_FILES*> SIM_LIB_MGR::m_embeddedFilesStack
private

Definition at line 98 of file sim_lib_mgr.h.

Referenced by ResolveLibraryPath(), and SetFilesStack().

◆ m_forceFullParse

bool SIM_LIB_MGR::m_forceFullParse
private

Definition at line 100 of file sim_lib_mgr.h.

Referenced by CreateModel(), SetForceFullParse(), SetLibrary(), and SIM_LIB_MGR().

◆ m_libraries

std::map<wxString, std::unique_ptr<SIM_LIBRARY> > SIM_LIB_MGR::m_libraries
private

Definition at line 101 of file sim_lib_mgr.h.

Referenced by Clear(), CreateModel(), GetLibraries(), and SetLibrary().

◆ m_models

std::vector<std::unique_ptr<SIM_MODEL> > SIM_LIB_MGR::m_models
private

◆ m_project

const PROJECT* SIM_LIB_MGR::m_project
private

Definition at line 99 of file sim_lib_mgr.h.

Referenced by ResolveLibraryPath(), and SIM_LIB_MGR().


The documentation for this class was generated from the following files: