28#include <boost/algorithm/string/case_conv.hpp>
33std::unique_ptr<SIM_LIBRARY>
35 const std::function<wxString(
const wxString&,
const wxString& )>& aResolver )
37 std::unique_ptr<SIM_LIBRARY>
library;
40 library = std::make_unique<SIM_LIBRARY_IBIS>();
42 library = std::make_unique<SIM_LIBRARY_SPICE>( aForceFullParse );
44 library->m_pathResolver = aResolver;
45 library->ReadFile( aFilePath, aReporter );
59 std::string lowerName = boost::to_lower_copy( aModelName );
61 for(
int i = 0; i < static_cast<int>(
m_modelNames.size() ); ++i )
63 if( boost::to_lower_copy(
m_modelNames.at( i ) ) == lowerName )
73 std::vector<MODEL> result;
75 for(
int i = 0; i < static_cast<int>(
m_modelNames.size() ); ++i )
A pure virtual class used to derive REPORTER objects from.
std::vector< MODEL > GetModels() const
static std::unique_ptr< SIM_LIBRARY > Create(const wxString &aFilePath, bool aForceFullParse, REPORTER &aReporter, const std::function< wxString(const wxString &, const wxString &)> &aResolver)
Read library from a source file (e.g.
virtual void ReadFile(const wxString &aFilePath, REPORTER &aReporter)=0
Read library from a source file.
std::vector< std::string > m_modelNames
SIM_MODEL * FindModel(const std::string &aModelName) const
std::vector< std::unique_ptr< SIM_MODEL > > m_models
static const std::string IbisFileExtension
This file contains miscellaneous commonly used macros and functions.
Definition of file extensions used in Kicad.