KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_value.cpp File Reference
#include <sim/sim_value.h>
#include <wx/translation.h>
#include <ki_exception.h>
#include <locale_io.h>
#include <pegtl/contrib/parse_tree.hpp>
#include <fmt/core.h>
#include <math/util.h>
#include <wx/regex.h>

Go to the source code of this file.

Classes

struct  SIM_VALUE_PARSER::numberSelector< Rule >
 
struct  SIM_VALUE_PARSER::numberSelector< SIM_VALUE_GRAMMAR::significand< SIM_VALUE::TYPE_INT > >
 
struct  SIM_VALUE_PARSER::numberSelector< SIM_VALUE_GRAMMAR::significand< SIM_VALUE::TYPE_FLOAT > >
 
struct  SIM_VALUE_PARSER::numberSelector< intPart >
 
struct  SIM_VALUE_PARSER::numberSelector< fracPart >
 
struct  SIM_VALUE_PARSER::numberSelector< exponent >
 
struct  SIM_VALUE_PARSER::numberSelector< unitPrefix< SIM_VALUE::TYPE_INT, NOTATION::SI > >
 
struct  SIM_VALUE_PARSER::numberSelector< unitPrefix< SIM_VALUE::TYPE_INT, NOTATION::SPICE > >
 
struct  SIM_VALUE_PARSER::numberSelector< unitPrefix< SIM_VALUE::TYPE_FLOAT, NOTATION::SI > >
 
struct  SIM_VALUE_PARSER::numberSelector< unitPrefix< SIM_VALUE::TYPE_FLOAT, NOTATION::SPICE > >
 
struct  SIM_VALUE_PARSER::PARSE_RESULT
 

Namespaces

namespace  SIM_VALUE_PARSER
 

Macros

#define CALL_INSTANCE(ValueType, Notation, func, ...)
 

Functions

PARSE_RESULT SIM_VALUE_PARSER::Parse (const std::string &aString, NOTATION aNotation=NOTATION::SI, SIM_VALUE::TYPE aValueType=SIM_VALUE::TYPE_FLOAT)
 
int SIM_VALUE_PARSER::UnitPrefixToExponent (std::string aPrefix, NOTATION aNotation=NOTATION::SI)
 
std::string SIM_VALUE_PARSER::ExponentToUnitPrefix (double aExponent, int &aExponentReduction, NOTATION aNotation=NOTATION::SI)
 
template<SIM_VALUE::TYPE ValueType, SIM_VALUE_PARSER::NOTATION Notation>
static void doIsValid (tao::pegtl::string_input<> &aIn)
 
template<SIM_VALUE::TYPE ValueType, SIM_VALUE_PARSER::NOTATION Notation>
static std::unique_ptr< tao::pegtl::parse_tree::node > doParse (tao::pegtl::string_input<> &aIn)
 
template<SIM_VALUE::TYPE ValueType, SIM_VALUE_PARSER::NOTATION Notation>
static void handleNodeForParse (tao::pegtl::parse_tree::node &aNode, SIM_VALUE_PARSER::PARSE_RESULT &aParseResult)
 

Macro Definition Documentation

◆ CALL_INSTANCE

#define CALL_INSTANCE (   ValueType,
  Notation,
  func,
  ... 
)

Definition at line 35 of file sim_value.cpp.

Function Documentation

◆ doIsValid()

template<SIM_VALUE::TYPE ValueType, SIM_VALUE_PARSER::NOTATION Notation>
static void doIsValid ( tao::pegtl::string_input<> &  aIn)
inlinestatic

Definition at line 123 of file sim_value.cpp.

Referenced by SIM_VALUE_GRAMMAR::IsValid().

◆ doParse()

template<SIM_VALUE::TYPE ValueType, SIM_VALUE_PARSER::NOTATION Notation>
static std::unique_ptr< tao::pegtl::parse_tree::node > doParse ( tao::pegtl::string_input<> &  aIn)
inlinestatic

Definition at line 148 of file sim_value.cpp.

Referenced by SIM_VALUE_PARSER::Parse().

◆ handleNodeForParse()