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

#include <sim_library_ibis.h>

Inheritance diagram for SIM_LIBRARY_IBIS:
SIM_LIBRARY

Public Member Functions

void ReadFile (const wxString &aFilePath, REPORTER &aReporter) override
 Read library from a source file.
 
bool InitModel (SIM_MODEL_IBIS &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, const 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_IBIS
 

Detailed Description

Definition at line 31 of file sim_library_ibis.h.

Member Function Documentation

◆ Create()

std::unique_ptr< SIM_LIBRARY > SIM_LIBRARY::Create ( const wxString & aFilePath,
bool aForceFullParse,
REPORTER & aReporter,
const 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 34 of file sim_library.cpp.

References FILEEXT::IbisFileExtension, and library.

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

◆ FindModel()

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

Definition at line 57 of file sim_library.cpp.

References m_modelNames, and m_models.

Referenced by SPICE_MODEL_PARSER::ReadModel(), and SPICE_MODEL_PARSER::ReadType().

◆ GetFilePath()

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

Definition at line 74 of file sim_library.h.

References m_filePath.

◆ GetModels()

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

Definition at line 71 of file sim_library.cpp.

References m_modelNames, and result.

◆ InitModel()

◆ isPinDiff()

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

Definition at line 86 of file sim_library_ibis.cpp.

References m_diffPins.

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

◆ ReadFile()

void SIM_LIBRARY_IBIS::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_ibis.cpp.

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

Friends And Related Symbol Documentation

◆ SIM_MODEL_IBIS

friend class SIM_MODEL_IBIS
friend

Definition at line 33 of file sim_library_ibis.h.

References SIM_MODEL_IBIS.

Referenced by InitModel(), ReadFile(), and SIM_MODEL_IBIS.

Member Data Documentation

◆ DIFF_FIELD

auto SIM_LIBRARY_IBIS::DIFF_FIELD = "Sim.Ibis.Diff"
staticconstexpr

◆ LIBRARY_FIELD

◆ m_diffPins

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

Definition at line 48 of file sim_library_ibis.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 GetFilePath(), and ReadFile().

◆ m_kibis

KIBIS SIM_LIBRARY_IBIS::m_kibis
mutableprotected

Definition at line 47 of file sim_library_ibis.h.

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

◆ m_modelNames

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

Definition at line 77 of file sim_library.h.

Referenced by FindModel(), GetModels(), and SIM_LIBRARY_IBIS::ReadFile().

◆ m_models

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

Definition at line 78 of file sim_library.h.

Referenced by FindModel(), and SIM_LIBRARY_IBIS::ReadFile().

◆ m_pathResolver

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

Definition at line 80 of file sim_library.h.

◆ MODEL_FIELD

auto SIM_LIBRARY_IBIS::MODEL_FIELD = "Sim.Ibis.Model"
staticconstexpr

◆ NAME_FIELD

◆ PIN_FIELD

auto SIM_LIBRARY_IBIS::PIN_FIELD = "Sim.Ibis.Pin"
staticconstexpr

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