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

#include <sim_library_spice.h>

Inheritance diagram for SIM_LIBRARY_SPICE:
SIM_LIBRARY

Public Member Functions

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

Static Public Attributes

static constexpr auto LIBRARY_FIELD = "Sim.Library"
 
static constexpr auto NAME_FIELD = "Sim.Name"
 

Protected Attributes

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
 

Private Attributes

std::unique_ptr< SPICE_LIBRARY_PARSERm_spiceLibraryParser
 

Friends

class SPICE_LIBRARY_PARSER
 

Detailed Description

Definition at line 32 of file sim_library_spice.h.

Constructor & Destructor Documentation

◆ SIM_LIBRARY_SPICE()

SIM_LIBRARY_SPICE::SIM_LIBRARY_SPICE ( bool  aForceFullParse)

Definition at line 29 of file sim_library_spice.cpp.

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.

◆ ReadFile()

void SIM_LIBRARY_SPICE::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 36 of file sim_library_spice.cpp.

References m_spiceLibraryParser, and SIM_LIBRARY::ReadFile().

Friends And Related Function Documentation

◆ SPICE_LIBRARY_PARSER

friend class SPICE_LIBRARY_PARSER
friend

Definition at line 35 of file sim_library_spice.h.

Member Data Documentation

◆ LIBRARY_FIELD

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

◆ 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_modelNames

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

◆ m_models

◆ m_pathResolver

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

◆ m_spiceLibraryParser

std::unique_ptr<SPICE_LIBRARY_PARSER> SIM_LIBRARY_SPICE::m_spiceLibraryParser
private

Definition at line 43 of file sim_library_spice.h.

Referenced by ReadFile().

◆ NAME_FIELD


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