21#ifndef SIM_MODEL_SERIALIZER_H
22#define SIM_MODEL_SERIALIZER_H
31 struct sep : plus<space> {};
42 struct pinName : plus<not_at<sep>, any> {};
61 struct flagParam : sor<seq<TAO_PEGTL_ISTRING( "off" ), not_at<alnum>>,
62 seq<TAO_PEGTL_ISTRING( "thermal" ), not_at<alnum>>,
63 seq<TAO_PEGTL_ISTRING( "xpart" ), not_at<alnum>>> {};
74 opt<fieldParamValuePairs>,
79 number<SIM_VALUE::TYPE_FLOAT, NOTATION::SI>> {};
86 template <
typename>
inline constexpr const char*
errorMessage =
nullptr;
93 "expected quoted or unquoted string";
95 "expected parameter=value pairs";
98 "expected 'R', 'C', 'L', 'V', 'I' or a number";
100 "expected end of string";
108 template <
typename Rule>
using control = must_if<error>::control<Rule>;
130 void ParsePins(
const std::string& aPins );
std::string GeneratePins() const
SIM_MODEL_SERIALIZER(SIM_MODEL &aModel)
void ParsePins(const std::string &aPins)
std::string generateParamValuePair(const SIM_MODEL::PARAM &aParam) const
std::string GenerateParams() const
std::string GenerateValue() const
void ParseValue(const std::string &aValue)
void ParseEnable(const std::string &aEnable)
std::string GenerateEnable() const
std::string GenerateDevice() const
virtual ~SIM_MODEL_SERIALIZER()=default
bool ParseParams(const std::string &aParams)
std::string GenerateDeviceSubtype() const
constexpr const char * errorMessage
must_if< error >::control< Rule > control
static constexpr bool raise_on_failure
static constexpr auto message