28#include <boost/algorithm/string/case_conv.hpp>
32std::unique_ptr<SIM_LIBRARY>
34 const std::function<wxString(
const wxString&,
const wxString& )>& aResolver )
36 std::unique_ptr<SIM_LIBRARY>
library;
38 if( aFilePath.EndsWith(
".ibs" ) )
39 library = std::make_unique<SIM_LIBRARY_IBIS>();
41 library = std::make_unique<SIM_LIBRARY_SPICE>( aForceFullParse );
43 library->m_pathResolver = aResolver;
44 library->ReadFile( aFilePath, aReporter );
58 std::string lowerName = boost::to_lower_copy( aModelName );
60 for(
int i = 0; i < static_cast<int>(
m_modelNames.size() ); ++i )
62 if( boost::to_lower_copy(
m_modelNames.at( i ) ) == lowerName )
72 std::vector<MODEL> result;
74 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
This file contains miscellaneous commonly used macros and functions.