27#include <boost/algorithm/string/replace.hpp>
28#include <boost/algorithm/string/trim.hpp>
42 case SIM_MODEL::TYPE::R_BEHAVIORAL:
43 case SIM_MODEL::TYPE::C_BEHAVIORAL:
44 case SIM_MODEL::TYPE::L_BEHAVIORAL:
51 case SIM_MODEL::TYPE::V_BEHAVIORAL:
58 case SIM_MODEL::TYPE::I_BEHAVIORAL:
66 wxFAIL_MSG(
"Unhandled SIM_MODEL type in SIM_MODEL_BEHAVIORAL" );
83 case TYPE::R_BEHAVIORAL:
AddParam( resistor );
break;
84 case TYPE::C_BEHAVIORAL:
AddParam( capacitor );
break;
85 case TYPE::L_BEHAVIORAL:
AddParam( inductor );
break;
86 case TYPE::V_BEHAVIORAL:
AddParam( vsource );
break;
87 case TYPE::I_BEHAVIORAL:
AddParam( isource );
break;
89 wxFAIL_MSG(
"Unhandled SIM_MODEL type in SIM_MODEL_IDEAL" );
96 std::string expr = aValueField;
98 if( expr.find(
"=" ) == std::string::npos )
101 boost::replace_first( expr,
"=",
"" );
109 const std::string& aDescription,
110 const std::string& aUnit )
bool parseValueField(const std::string &aValueField)
SIM_MODEL_BEHAVIORAL(TYPE aType)
static PARAM::INFO makeParams(const std::string &aName, const std::string &aDescription, const std::string &aUnit)
void AddParam(const PARAM::INFO &aInfo)
virtual const PARAM & GetParam(unsigned aParamIndex) const
void SetParamValue(int aParamIndex, const std::string &aValue, SIM_VALUE::NOTATION aNotation=SIM_VALUE::NOTATION::SI)
static std::string ToSpice(const std::string &aString)
std::string ModelLine(const SPICE_ITEM &aItem) const override
std::string ItemLine(const SPICE_ITEM &aItem) const override
virtual std::string ItemLine(const SPICE_ITEM &aItem) const
const SIM_MODEL & m_model