amath
1.8.5
Simple command line calculator
|
Base class for all nodes related to mathematical expressions. More...
#include <nodes.h>
Public Member Functions | |
ExpressionNode () | |
ExpressionNode (Number *value) | |
virtual | ~ExpressionNode () |
NodeType | GetNodeType () |
virtual bool | IsSilent () |
virtual char * | GetText ()=0 |
virtual Number * | Evaluate ()=0 |
virtual int | GetPrecedence ()=0 |
char * | GetTextCode () |
char * | Execute () |
Public Member Functions inherited from SyntaxNode | |
SyntaxNode () | |
virtual | ~SyntaxNode () |
void | SetFirstNode () |
bool | GetFirstNode () const |
SyntaxNode * | GetParent () const |
void | SetParent (SyntaxNode *node) |
virtual ReductionType | GetReductionType () |
virtual void | ResetIterator () |
virtual SyntaxNode * | GetNext ()=0 |
virtual void | Attach (SyntaxNode *node)=0 |
virtual void | Detach (SyntaxNode *node)=0 |
virtual void | Replace (SyntaxNode *n, SyntaxNode *x)=0 |
Protected Member Functions | |
virtual char * | GetNodeText ()=0 |
Protected Attributes | |
Number * | result |
Protected Attributes inherited from SyntaxNode | |
CharBuffer * | output |
SyntaxNode * | parent |
SyntaxNode * | iterator |
bool | leftBottom |
Base class for all nodes related to mathematical expressions.
Nodes of this type is used to build trees representing an mathematical expressions. Each node in the tree consist of a number, an operator or any other element in an expression.
ExpressionNode::ExpressionNode | ( | ) |
Definition at line 89 of file nodes.cpp.
References result, and SyntaxNode::SyntaxNode().
Referenced by AbsoluteNode::AbsoluteNode(), FactorialNode::FactorialNode(), FunctionNode::FunctionNode(), NumericOperator::NumericOperator(), UnaryNode::UnaryNode(), and VariableNode::VariableNode().
|
explicit |
Definition at line 95 of file nodes.cpp.
References result, and SyntaxNode::SyntaxNode().
Referenced by NumericValueNode::NumericValueNode().
|
virtual |
|
pure virtual |
Implemented in AssignmentNode, PowerNode, DivisionNode, NumericValueNode, MultiplicationNode, SubtractionNode, InsVariableNode, AdditionNode, VariableNode, FactorialNode, AbsoluteNode, UnaryNode, TruncNode, RoundNode, SignumNode, ArcExcosecantNode, ArcExsecantNode, ArcChordNode, ArcCosineNode, ArcCosecantNode, ArcCotangentNode, ArcCoversedCosineNode, ArcCoversedSineNode, ArcHaCoversedCosineNode, ArcHaCoversedSineNode, ArcHaVersedCosineNode, ArcHaVersedSineNode, ArcSecantNode, ArcSineNode, ArcTangentNode, ArcVersedCosineNode, ArcVersedSineNode, CeilingNode, ChordNode, CosecantNode, CosineNode, CotangentNode, CoversedCosineNode, CoversedSineNode, CubeRootNode, ExcosecantNode, ExsecantNode, FloorNode, HaCoversedCosineNode, HaCoversedSineNode, HaVersedCosineNode, HaVersedSineNode, HyperbolicArcCosecantNode, HyperbolicArccosineNode, HyperbolicArcCotangentNode, HyperbolicArcSecantNode, HyperbolicArcsineNode, HyperbolicArctangentNode, HyperbolicCosecantNode, HyperbolicCosineNode, HyperbolicCotangentNode, HyperbolicSecantNode, HyperbolicSineNode, HyperbolicTangentNode, LnRootNode, LogNode, BinaryLogNode, SecantNode, SineNode, SquareRootNode, TangentNode, VersedCosineNode, VersedSineNode, UserFunctionNode, and AbsoluteFunctionNode.
Referenced by AbsoluteFunctionNode::Evaluate(), UserFunctionNode::Evaluate(), ArcExsecantNode::Evaluate(), ArcCotangentNode::Evaluate(), ArcSineNode::Evaluate(), HaCoversedSineNode::Evaluate(), HaVersedCosineNode::Evaluate(), ArcTangentNode::Evaluate(), HaVersedSineNode::Evaluate(), HyperbolicArcCosecantNode::Evaluate(), ArcCoversedCosineNode::Evaluate(), VersedSineNode::Evaluate(), VersedCosineNode::Evaluate(), ExcosecantNode::Evaluate(), ArcVersedCosineNode::Evaluate(), TangentNode::Evaluate(), SquareRootNode::Evaluate(), SineNode::Evaluate(), HyperbolicArccosineNode::Evaluate(), SecantNode::Evaluate(), HyperbolicArcCotangentNode::Evaluate(), BinaryLogNode::Evaluate(), ArcVersedSineNode::Evaluate(), LnRootNode::Evaluate(), HyperbolicTangentNode::Evaluate(), HyperbolicSineNode::Evaluate(), HyperbolicSecantNode::Evaluate(), HyperbolicCotangentNode::Evaluate(), HyperbolicCosineNode::Evaluate(), HyperbolicCosecantNode::Evaluate(), HyperbolicArctangentNode::Evaluate(), HyperbolicArcSecantNode::Evaluate(), HyperbolicArcsineNode::Evaluate(), ArcChordNode::Evaluate(), ArcCoversedSineNode::Evaluate(), CeilingNode::Evaluate(), ChordNode::Evaluate(), ArcHaCoversedCosineNode::Evaluate(), CosecantNode::Evaluate(), HaCoversedCosineNode::Evaluate(), FloorNode::Evaluate(), ExsecantNode::Evaluate(), ArcHaVersedSineNode::Evaluate(), CubeRootNode::Evaluate(), CoversedSineNode::Evaluate(), CoversedCosineNode::Evaluate(), LogNode::Evaluate(), CosineNode::Evaluate(), ArcCosineNode::Evaluate(), ArcHaCoversedSineNode::Evaluate(), CotangentNode::Evaluate(), ArcHaVersedCosineNode::Evaluate(), ArcExcosecantNode::Evaluate(), ArcCosecantNode::Evaluate(), ArcSecantNode::Evaluate(), RoundNode::Evaluate(), SignumNode::Evaluate(), TruncNode::Evaluate(), UnaryNode::Evaluate(), AbsoluteNode::Evaluate(), FactorialNode::Evaluate(), AdditionNode::Evaluate(), SubtractionNode::Evaluate(), MultiplicationNode::Evaluate(), DivisionNode::Evaluate(), PowerNode::Evaluate(), AssignmentNode::Evaluate(), EvalStatement::Execute(), and Grid::FunctionValue().
|
virtual |
|
protectedpure virtual |
Implemented in ComplexiNode, PiNode, AssignmentNode, EulersNumberNode, PowerNode, NumericValueNode, DivisionNode, MultiplicationNode, SubtractionNode, InsVariableNode, AdditionNode, VariableNode, FactorialNode, AbsoluteNode, FunctionNode, UnaryNode, and UserFunctionNode.
Referenced by NumericOperator::GetText(), and GetTextCode().
|
virtual |
|
pure virtual |
Implemented in AssignmentNode, PowerNode, DivisionNode, NumericValueNode, MultiplicationNode, SubtractionNode, AdditionNode, VariableNode, FactorialNode, AbsoluteNode, FunctionNode, and UnaryNode.
Referenced by Optimizer::BalanceTree(), UnaryNode::GetText(), and NumericOperator::GetText().
|
pure virtual |
Implemented in NumericValueNode, InsVariableNode, VariableNode, NumericOperator, FactorialNode, AbsoluteNode, FunctionNode, and UnaryNode.
Referenced by EvalStatement::Execute(), UnaryNode::GetText(), FunctionNode::GetText(), AbsoluteNode::GetText(), FactorialNode::GetText(), NumericOperator::GetText(), UserFunction::InitializeTexts(), and FunctionList::ListContent().
|
virtual |
Implements SyntaxNode.
Definition at line 119 of file nodes.cpp.
References GetNodeText().
|
virtual |
Reimplemented in AssignmentNode.
Definition at line 114 of file nodes.cpp.
Referenced by Parser::ParseEvaluation().
|
protected |
Definition at line 116 of file nodes.h.
Referenced by AbsoluteFunctionNode::Evaluate(), ArcExcosecantNode::Evaluate(), ArcChordNode::Evaluate(), ArcCoversedCosineNode::Evaluate(), ArcTangentNode::Evaluate(), HaVersedCosineNode::Evaluate(), HaVersedSineNode::Evaluate(), ArcVersedCosineNode::Evaluate(), HyperbolicArcCosecantNode::Evaluate(), HyperbolicArccosineNode::Evaluate(), ArcCoversedSineNode::Evaluate(), ArcVersedSineNode::Evaluate(), HyperbolicArcCotangentNode::Evaluate(), HyperbolicArcSecantNode::Evaluate(), CeilingNode::Evaluate(), HyperbolicArcsineNode::Evaluate(), VersedSineNode::Evaluate(), VersedCosineNode::Evaluate(), HyperbolicArctangentNode::Evaluate(), TangentNode::Evaluate(), SquareRootNode::Evaluate(), SineNode::Evaluate(), ArcCosineNode::Evaluate(), SecantNode::Evaluate(), ArcHaCoversedCosineNode::Evaluate(), BinaryLogNode::Evaluate(), LogNode::Evaluate(), LnRootNode::Evaluate(), HyperbolicTangentNode::Evaluate(), HyperbolicSineNode::Evaluate(), HyperbolicSecantNode::Evaluate(), HyperbolicCotangentNode::Evaluate(), ChordNode::Evaluate(), HyperbolicCosecantNode::Evaluate(), HyperbolicCosineNode::Evaluate(), CosecantNode::Evaluate(), ArcHaCoversedSineNode::Evaluate(), CosineNode::Evaluate(), CotangentNode::Evaluate(), ArcExsecantNode::Evaluate(), ArcCosecantNode::Evaluate(), ArcHaVersedCosineNode::Evaluate(), HaCoversedSineNode::Evaluate(), HaCoversedCosineNode::Evaluate(), FloorNode::Evaluate(), ExsecantNode::Evaluate(), ExcosecantNode::Evaluate(), CubeRootNode::Evaluate(), CoversedCosineNode::Evaluate(), CoversedSineNode::Evaluate(), ArcHaVersedSineNode::Evaluate(), ArcCotangentNode::Evaluate(), ArcSecantNode::Evaluate(), ArcSineNode::Evaluate(), RoundNode::Evaluate(), SignumNode::Evaluate(), TruncNode::Evaluate(), UnaryNode::Evaluate(), AbsoluteNode::Evaluate(), FactorialNode::Evaluate(), VariableNode::Evaluate(), AdditionNode::Evaluate(), SubtractionNode::Evaluate(), MultiplicationNode::Evaluate(), NumericValueNode::Evaluate(), DivisionNode::Evaluate(), PowerNode::Evaluate(), ExpressionNode(), NumericValueNode::GetNodeText(), NumericValueNode::GetPrecedence(), NumericValueNode::ReplaceWith(), and ~ExpressionNode().