amath
1.8.5
Simple command line calculator
|
Use of a variable in a syntax tree. More...
#include <values.h>
Public Member Functions | |
VariableNode (Variable *variable) | |
char * | GetText () |
Number * | Evaluate () |
void | AssignValue (Number *value) const |
int | GetPrecedence () |
SyntaxNode * | GetNext () |
void | Attach (SyntaxNode *node) |
void | Detach (SyntaxNode *node) |
void | Replace (SyntaxNode *n, SyntaxNode *x) |
Public Member Functions inherited from ExpressionNode | |
ExpressionNode () | |
ExpressionNode (Number *value) | |
virtual | ~ExpressionNode () |
NodeType | GetNodeType () |
virtual bool | IsSilent () |
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 () |
Protected Member Functions | |
char * | GetNodeText () |
Private Attributes | |
Variable * | variable |
Additional Inherited Members | |
Protected Attributes inherited from ExpressionNode | |
Number * | result |
Protected Attributes inherited from SyntaxNode | |
CharBuffer * | output |
SyntaxNode * | parent |
SyntaxNode * | iterator |
bool | leftBottom |
|
explicit |
Definition at line 293 of file values.cpp.
References ExpressionNode::ExpressionNode(), and variable.
Referenced by InsVariableNode::InsVariableNode(), and Parser::ParseIdent().
void VariableNode::AssignValue | ( | Number * | value | ) | const |
Definition at line 309 of file values.cpp.
References Variable::AssignValue(), and variable.
Referenced by AssignmentNode::Evaluate().
|
virtual |
|
virtual |
|
virtual |
Implements ExpressionNode.
Reimplemented in InsVariableNode.
Definition at line 303 of file values.cpp.
References Variable::GetValue(), ExpressionNode::result, and variable.
Referenced by AssignmentNode::Evaluate().
|
virtual |
|
protectedvirtual |
Implements ExpressionNode.
Reimplemented in InsVariableNode.
Definition at line 319 of file values.cpp.
References Variable::GetName(), and variable.
|
virtual |
|
virtual |
Implements ExpressionNode.
Reimplemented in InsVariableNode.
Definition at line 314 of file values.cpp.
References Variable::GetName(), and variable.
|
virtual |
|
private |
Definition at line 127 of file values.h.
Referenced by AssignValue(), Evaluate(), GetNodeText(), GetText(), and VariableNode().