KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LIBEVAL::VALUE Class Reference

#include <libeval_compiler.h>

Inheritance diagram for LIBEVAL::VALUE:
PCBEXPR_COMPONENT_CLASS_VALUE PCBEXPR_LAYER_VALUE PCBEXPR_NETCLASS_VALUE PCBEXPR_NET_VALUE PCBEXPR_PINTYPE_VALUE

Public Member Functions

 VALUE ()
 
 VALUE (const wxString &aStr, bool aIsWildcard=false)
 
 VALUE (const double aVal)
 
virtual ~VALUE ()=default
 
virtual double AsDouble () const
 
virtual const wxString & AsString () const
 
virtual bool EqualTo (CONTEXT *aCtx, const VALUE *b) const
 
virtual bool NotEqualTo (CONTEXT *aCtx, const VALUE *b) const
 
VAR_TYPE_T GetType () const
 
void Set (double aValue)
 
void SetDeferredEval (std::function< double()> aLambda)
 
void SetDeferredEval (std::function< wxString()> aLambda)
 
void Set (const wxString &aValue)
 
void Set (const VALUE &val)
 
void SetUnits (const EDA_UNITS aUnits)
 
EDA_UNITS GetUnits () const
 
bool StringIsWildcard () const
 

Static Public Member Functions

static VALUEMakeNullValue ()
 

Private Attributes

VAR_TYPE_T m_type
 
double m_valueDbl
 
wxString m_valueStr
 
bool m_stringIsWildcard
 
bool m_isDeferredDbl
 
std::function< double()> m_lambdaDbl
 
bool m_isDeferredStr
 
std::function< wxString()> m_lambdaStr
 
EDA_UNITS m_units
 

Detailed Description

Definition at line 194 of file libeval_compiler.h.

Constructor & Destructor Documentation

◆ VALUE() [1/3]

◆ VALUE() [2/3]

LIBEVAL::VALUE::VALUE ( const wxString & aStr,
bool aIsWildcard = false )
inline

◆ VALUE() [3/3]

LIBEVAL::VALUE::VALUE ( const double aVal)
inline

◆ ~VALUE()

virtual LIBEVAL::VALUE::~VALUE ( )
virtualdefault

Member Function Documentation

◆ AsDouble()

◆ AsString()

◆ EqualTo()

◆ GetType()

VAR_TYPE_T LIBEVAL::VALUE::GetType ( ) const
inline

◆ GetUnits()

EDA_UNITS LIBEVAL::VALUE::GetUnits ( ) const
inline

Definition at line 300 of file libeval_compiler.h.

References m_units.

Referenced by LIBEVAL::UOP::Exec().

◆ MakeNullValue()

static VALUE * LIBEVAL::VALUE::MakeNullValue ( )
inlinestatic

Definition at line 225 of file libeval_compiler.h.

References m_type, VALUE, VALUE(), and LIBEVAL::VT_NULL.

Referenced by PCBEXPR_VAR_REF::GetValue().

◆ NotEqualTo()

◆ Set() [1/3]

void LIBEVAL::VALUE::Set ( const VALUE & val)
inline

Definition at line 289 of file libeval_compiler.h.

References m_type, m_valueDbl, m_valueStr, VALUE(), and LIBEVAL::VT_STRING.

◆ Set() [2/3]

void LIBEVAL::VALUE::Set ( const wxString & aValue)
inline

Definition at line 283 of file libeval_compiler.h.

References m_type, m_valueStr, and LIBEVAL::VT_STRING.

◆ Set() [3/3]

◆ SetDeferredEval() [1/2]

void LIBEVAL::VALUE::SetDeferredEval ( std::function< double()> aLambda)
inline

Definition at line 269 of file libeval_compiler.h.

References m_isDeferredDbl, m_lambdaDbl, m_type, and LIBEVAL::VT_NUMERIC.

◆ SetDeferredEval() [2/2]

void LIBEVAL::VALUE::SetDeferredEval ( std::function< wxString()> aLambda)
inline

Definition at line 276 of file libeval_compiler.h.

References m_isDeferredStr, m_lambdaStr, m_type, and LIBEVAL::VT_STRING.

◆ SetUnits()

void LIBEVAL::VALUE::SetUnits ( const EDA_UNITS aUnits)
inline

Definition at line 298 of file libeval_compiler.h.

References m_units.

Referenced by LIBEVAL::UOP::Exec().

◆ StringIsWildcard()

bool LIBEVAL::VALUE::StringIsWildcard ( ) const
inline

Member Data Documentation

◆ m_isDeferredDbl

bool LIBEVAL::VALUE::m_isDeferredDbl
mutableprivate

Definition at line 310 of file libeval_compiler.h.

Referenced by AsDouble(), SetDeferredEval(), VALUE(), VALUE(), and VALUE().

◆ m_isDeferredStr

bool LIBEVAL::VALUE::m_isDeferredStr
mutableprivate

Definition at line 313 of file libeval_compiler.h.

Referenced by AsString(), SetDeferredEval(), VALUE(), VALUE(), and VALUE().

◆ m_lambdaDbl

std::function<double()> LIBEVAL::VALUE::m_lambdaDbl
private

Definition at line 311 of file libeval_compiler.h.

Referenced by AsDouble(), and SetDeferredEval().

◆ m_lambdaStr

std::function<wxString()> LIBEVAL::VALUE::m_lambdaStr
private

Definition at line 314 of file libeval_compiler.h.

Referenced by AsString(), and SetDeferredEval().

◆ m_stringIsWildcard

bool LIBEVAL::VALUE::m_stringIsWildcard
private

Definition at line 308 of file libeval_compiler.h.

Referenced by EqualTo(), StringIsWildcard(), VALUE(), VALUE(), and VALUE().

◆ m_type

VAR_TYPE_T LIBEVAL::VALUE::m_type
private

◆ m_units

EDA_UNITS LIBEVAL::VALUE::m_units
private

Definition at line 316 of file libeval_compiler.h.

Referenced by GetUnits(), SetUnits(), VALUE(), VALUE(), and VALUE().

◆ m_valueDbl

double LIBEVAL::VALUE::m_valueDbl
mutableprivate

Definition at line 306 of file libeval_compiler.h.

Referenced by AsDouble(), Set(), Set(), VALUE(), VALUE(), and VALUE().

◆ m_valueStr

wxString LIBEVAL::VALUE::m_valueStr
mutableprivate

Definition at line 307 of file libeval_compiler.h.

Referenced by AsString(), Set(), Set(), and VALUE().


The documentation for this class was generated from the following files: