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:
| bool | AddOperand | (hzNumexpTerm* pOperand) | |
| double | Evaluate | (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 |
| void | SetOperator | (hzOperator bOp) | |
| void | SetUnaryOp | (hzUnary uop) |
Member Variables:
| double | m_Result | Result of expression evaluation | |
| hzOperator | m_eBinary | Operator to apply to the two terms | |
| hzUnary | m_eUnary | Unary operator to apply to the result (if applicable) | |
| hzNumexpTerm* | m_pA | First term in numeric expression | |
| hzNumexpTerm* | m_pB | Second term in numeric expression |