37 extern int ReadInt(
char*& text,
bool aSkipSeparator =
true );
38 extern double ReadDouble(
char*& text,
bool aSkipSeparator =
true );
61 bool is_immediate =
true;
85 double curr_value = 0.0;
122 wxFAIL_MSG(
"AM_PARAM::GetValue(): NULL param aDcode" );
135 "unexpected type %d",
210 ivalue =
ReadInt( aText,
false );
std::vector< AM_PARAM_ITEM > m_paramStack
unsigned GetParamCount() const
GetParamCount() Returns the number of parameters stored in parameter list.
double GetValue(const D_CODE *aDcode) const
unsigned GetIndex() const
bool IsImmediate() const
Function IsImmediate tests if this AM_PARAM holds an immediate parameter or is a pointer into a param...
parm_item_type GetType() const
double ReadDouble(char *&text, bool aSkipSeparator=true)
Function ReadDouble reads a double from an ASCII character buffer.
AM_PARAM holds an operand for an AM_PARAM as defined within standard RS274X.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
double Evaluate(AM_PARAM_EVAL_STACK &aExp)
Evaluate an basic arithmetic expression (infix notation) with precedence The expression is a sequence...
double GetLocalParam(const D_CODE *aDcode, unsigned aParamId) const
function GetLocalParam Usually, parameters are defined inside the aperture primitive using immediate ...
bool ReadParam(char *&aText)
Function ReadParam Read one aperture macro parameter a parameter can be: a number a reference to an a...
This file contains miscellaneous commonly used macros and functions.
void PushOperator(parm_item_type aType, double aValue)
function PushOperator add an operator/operand to the current stack
int m_Num_Dcode
D code value ( >= 10 )
double GetParam(unsigned aIdx) const
GetParam() Returns a parameter stored in parameter list.
std::vector< AM_PARAM_EVAL > AM_PARAM_EVAL_STACK
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
This helper class hold a value or an arithmetic operator to calculate the final value of a aperture m...
D_CODE holds a gerber DCODE (also called Aperture) definition.
int ReadInt(char *&text, bool aSkipSeparator=true)
Function ReadInt reads an int from an ASCII character buffer.
APERTURE_MACRO * GetMacro() const
void SetIndex(int aIndex)
Struct APERTURE_MACRO helps support the "aperture macro" defined within standard RS274X.