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

#include <libeval_compiler.h>

Inheritance diagram for LIBEVAL::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 ()
 
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)
 

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
 

Detailed Description

Definition at line 184 of file libeval_compiler.h.

Constructor & Destructor Documentation

◆ VALUE() [1/3]

LIBEVAL::VALUE::VALUE ( )
inline

Definition at line 187 of file libeval_compiler.h.

◆ VALUE() [2/3]

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

Definition at line 195 of file libeval_compiler.h.

◆ VALUE() [3/3]

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

Definition at line 204 of file libeval_compiler.h.

◆ ~VALUE()

virtual LIBEVAL::VALUE::~VALUE ( )
inlinevirtual

Definition at line 212 of file libeval_compiler.h.

Member Function Documentation

◆ AsDouble()

virtual double LIBEVAL::VALUE::AsDouble ( ) const
inlinevirtual

◆ AsString()

◆ EqualTo()

◆ GetType()

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

Definition at line 242 of file libeval_compiler.h.

References m_type.

Referenced by PCBEXPR_EVALUATOR::Evaluate(), LIBEVAL::UOP::Exec(), and testEvalExpr().

◆ NotEqualTo()

bool LIBEVAL::VALUE::NotEqualTo ( CONTEXT aCtx,
const VALUE b 
) const
virtual

◆ Set() [1/3]

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

Definition at line 270 of file libeval_compiler.h.

References m_type, m_valueDbl, m_valueStr, and LIBEVAL::VT_STRING.

◆ Set() [2/3]

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

Definition at line 264 of file libeval_compiler.h.

References m_type, m_valueStr, and LIBEVAL::VT_STRING.

◆ Set() [3/3]

◆ SetDeferredEval() [1/2]

◆ SetDeferredEval() [2/2]

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

Definition at line 257 of file libeval_compiler.h.

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

Member Data Documentation

◆ m_isDeferredDbl

bool LIBEVAL::VALUE::m_isDeferredDbl
mutableprivate

Definition at line 285 of file libeval_compiler.h.

Referenced by AsDouble(), and SetDeferredEval().

◆ m_isDeferredStr

bool LIBEVAL::VALUE::m_isDeferredStr
mutableprivate

Definition at line 288 of file libeval_compiler.h.

Referenced by AsString(), and SetDeferredEval().

◆ m_lambdaDbl

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

Definition at line 286 of file libeval_compiler.h.

Referenced by AsDouble(), and SetDeferredEval().

◆ m_lambdaStr

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

Definition at line 289 of file libeval_compiler.h.

Referenced by AsString(), and SetDeferredEval().

◆ m_stringIsWildcard

bool LIBEVAL::VALUE::m_stringIsWildcard
private

Definition at line 283 of file libeval_compiler.h.

Referenced by EqualTo().

◆ m_type

VAR_TYPE_T LIBEVAL::VALUE::m_type
private

Definition at line 280 of file libeval_compiler.h.

Referenced by EqualTo(), GetType(), NotEqualTo(), Set(), and SetDeferredEval().

◆ m_valueDbl

double LIBEVAL::VALUE::m_valueDbl
mutableprivate

Definition at line 281 of file libeval_compiler.h.

Referenced by AsDouble(), and Set().

◆ m_valueStr

wxString LIBEVAL::VALUE::m_valueStr
mutableprivate

Definition at line 282 of file libeval_compiler.h.

Referenced by AsString(), and Set().


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