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

#include <sim_library_kibis.h>

Inheritance diagram for SIM_LIBRARY_KIBIS:
SIM_LIBRARY

Public Member Functions

void ReadFile (const wxString &aFilePath, REPORTER &aReporter) override
 Read library from a source file.
 
bool InitModel (SIM_MODEL_KIBIS &aModel, wxString aCompName)
 
bool isPinDiff (const std::string &aComp, const std::string &aPinNumber) const
 
SIM_MODELFindModel (const std::string &aModelName) const
 
std::vector< MODELGetModels () const
 
std::string GetFilePath () const
 

Static Public Member Functions

static std::unique_ptr< SIM_LIBRARYCreate (const wxString &aFilePath, bool aForceFullParse, REPORTER &aReporter, std::function< wxString(const wxString &, const wxString &)> *aResolver)
 Read library from a source file (e.g.
 

Static Public Attributes

static constexpr auto PIN_FIELD = "Sim.Ibis.Pin"
 
static constexpr auto MODEL_FIELD = "Sim.Ibis.Model"
 
static constexpr auto DIFF_FIELD = "Sim.Ibis.Diff"
 
static constexpr auto LIBRARY_FIELD = "Sim.Library"
 
static constexpr auto NAME_FIELD = "Sim.Name"
 

Protected Attributes

KIBIS m_kibis
 
std::vector< std::pair< std::string, std::string > > m_diffPins
 
std::vector< std::string > m_modelNames
 
std::vector< std::unique_ptr< SIM_MODEL > > m_models
 
std::function< wxString(const wxString &, const wxString &)> * m_pathResolver
 
std::string m_filePath
 

Friends

class SIM_MODEL_KIBIS
 

Detailed Description

Definition at line 31 of file sim_library_kibis.h.

Member Function Documentation

◆ Create()

std::unique_ptr< SIM_LIBRARY > SIM_LIBRARY::Create ( const wxString &  aFilePath,
bool  aForceFullParse,
REPORTER aReporter,
std::function< wxString(const wxString &, const wxString &)> *  aResolver 
)
staticinherited

Read library from a source file (e.g.

in Spice format), and return a newly constructed object of an appropriate subclass.

Parameters
aFilePathPath to the file.
aReporterThe reporter the library reports to
aForceFullParseCaller requires fully parsed models. If false fallback models can be generarted for performance.
Returns
The library loaded in a newly constructed object.

Definition at line 33 of file sim_library.cpp.

References library.

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

◆ FindModel()

SIM_MODEL * SIM_LIBRARY::FindModel ( const std::string &  aModelName) const
inherited

◆ GetFilePath()

std::string SIM_LIBRARY::GetFilePath ( ) const
inlineinherited

Definition at line 74 of file sim_library.h.

References SIM_LIBRARY::m_filePath.

◆ GetModels()

std::vector< SIM_LIBRARY::MODEL > SIM_LIBRARY::GetModels ( ) const
inherited

Definition at line 70 of file sim_library.cpp.

References SIM_LIBRARY::m_modelNames, and SIM_LIBRARY::m_models.

◆ InitModel()

◆ isPinDiff()

bool SIM_LIBRARY_KIBIS::isPinDiff ( const std::string &  aComp,
const std::string &  aPinNumber 
) const

Definition at line 86 of file sim_library_kibis.cpp.

References m_diffPins.

Referenced by DIALOG_SIM_MODEL< T >::onPinCombobox().

◆ ReadFile()

void SIM_LIBRARY_KIBIS::ReadFile ( const wxString &  aFilePath,
REPORTER aReporter 
)
overridevirtual

Read library from a source file.

Must be in the format appropriate to the subclass, e.g. Spice for SIM_LIBRARY_SPICE).

Parameters
aFilePathPath to the file.
Exceptions
IO_ERRORon read or parsing error.

Implements SIM_LIBRARY.

Definition at line 32 of file sim_library_kibis.cpp.

References _, SIM_MODEL::Create(), InitModel(), KIBIS::m_components, m_kibis, SIM_LIBRARY::m_modelNames, SIM_LIBRARY::m_models, KIBIS_COMPONENT::m_name, KIBIS_ANY::m_valid, SIM_LIBRARY::ReadFile(), REPORTER::Report(), RPT_SEVERITY_ERROR, and SCH_PIN::SetNumber().

Friends And Related Function Documentation

◆ SIM_MODEL_KIBIS

friend class SIM_MODEL_KIBIS
friend

Definition at line 33 of file sim_library_kibis.h.

Member Data Documentation

◆ DIFF_FIELD

constexpr auto SIM_LIBRARY_KIBIS::DIFF_FIELD = "Sim.Ibis.Diff"
staticconstexpr

◆ LIBRARY_FIELD

constexpr auto SIM_LIBRARY::LIBRARY_FIELD = "Sim.Library"
staticconstexprinherited

◆ m_diffPins

std::vector<std::pair<std::string, std::string> > SIM_LIBRARY_KIBIS::m_diffPins
protected

Definition at line 48 of file sim_library_kibis.h.

Referenced by InitModel(), and isPinDiff().

◆ m_filePath

std::string SIM_LIBRARY::m_filePath
protectedinherited

Definition at line 82 of file sim_library.h.

Referenced by SIM_LIBRARY::GetFilePath(), and SIM_LIBRARY::ReadFile().

◆ m_kibis

KIBIS SIM_LIBRARY_KIBIS::m_kibis
mutableprotected

Definition at line 47 of file sim_library_kibis.h.

Referenced by SIM_MODEL_KIBIS::ChangePin(), InitModel(), and ReadFile().

◆ m_modelNames

std::vector<std::string> SIM_LIBRARY::m_modelNames
protectedinherited

◆ m_models

std::vector<std::unique_ptr<SIM_MODEL> > SIM_LIBRARY::m_models
protectedinherited

◆ m_pathResolver

std::function<wxString( const wxString&, const wxString& )>* SIM_LIBRARY::m_pathResolver
protectedinherited

◆ MODEL_FIELD

constexpr auto SIM_LIBRARY_KIBIS::MODEL_FIELD = "Sim.Ibis.Model"
staticconstexpr

◆ NAME_FIELD

constexpr auto SIM_LIBRARY::NAME_FIELD = "Sim.Name"
staticconstexprinherited

◆ PIN_FIELD

constexpr auto SIM_LIBRARY_KIBIS::PIN_FIELD = "Sim.Ibis.Pin"
staticconstexpr

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