31#include <wx/valtext.h>
152 return ( *
this == aOther || *
this > aOther );
157 return ( *
this == aOther || *
this < aOther );
193 bool Validate( wxWindow* aParent )
override;
wxObject * Clone() const override
bool m_emptyAllowed
< Is it valid to get an empty value?
bool Validate(wxWindow *aParent) override
SPICE_VALIDATOR(bool aEmptyAllowed=false)
Helper class to recognize Spice formatted values.
SPICE_VALUE operator+(const SPICE_VALUE &aOther) const
bool operator>(const SPICE_VALUE &aOther) const
SPICE_VALUE(double aDouble, UNIT_PREFIX aPrefix=PFX_NONE)
SPICE_VALUE operator-(const SPICE_VALUE &aOther) const
UNIT_PREFIX m_prefix
Was the value defined using the Spice notation?
static UNIT_PREFIX ParseSIPrefix(wxChar c)
SPICE_VALUE(int aInt, UNIT_PREFIX aPrefix=PFX_NONE)
void Normalize()
Normalize the value.
double ToNormalizedDouble(wxString *aPrefix)
wxString ToString() const
Return string value as when converting double to string (e.g.
SPICE_VALUE operator/(const SPICE_VALUE &aOther) const
Remove redundant zeros from the end of a string.
wxString ToSpiceString() const
Return string value in Spice format (e.g.
SPICE_VALUE operator*(const SPICE_VALUE &aOther) const
bool operator==(const SPICE_VALUE &aOther) const
bool operator>=(const SPICE_VALUE &aOther) const
SPICE_VALUE()
Parses the string to create a Spice value (e.g. 100n)
static void StripZeros(wxString &aString)
wxString ToOrigString() const
Return either a normal string or Spice format string, depending on the original value format.
bool operator<(const SPICE_VALUE &aOther) const
bool operator<=(const SPICE_VALUE &aOther) const
bool IsSpiceString() const
Return true if the object was initiated with a Spice formatted string value.