Defined in file: hzNumexp.h

Derivative of: hzNumexpTerm

The hzNumexpForm class provides the method of parenthesis by allowing two operands to be tied to a binary operator. The operands can themselves be formulae and so any expression can be represented as a series of hzNumexpForm instance. Any unary operations are to be applied to the formula as a whole and not to the individual operands.

Constructors/Detructors

hzNumexpForm*hzNumexpForm(void)
void~hzNumexpForm(void)

Public Methods:

boolAddOperand(hzNumexpTerm* pOperand)
doubleEvaluate(void)Evaluate this expression (hzNumexpForm instance) to a single atomic value. A hzNumexpForm instance is created by an expression parser when the expression amounts to a 'term operator term' rather than only a single term. hzNumexpForm Evaluation is thus always a matter of evaluating both terms and applying the operator. Where the terms are themselves hzNumexpForm instances, this function recurses. Arguments: None
voidSetOperator(hzOperator bOp)
voidSetUnaryOp(hzUnary uop)

Member Variables:

doublem_ResultResult of expression evaluation
hzOperatorm_eBinaryOperator to apply to the two terms
hzUnarym_eUnaryUnary operator to apply to the result (if applicable)
hzNumexpTerm*m_pAFirst term in numeric expression
hzNumexpTerm*m_pBSecond term in numeric expression