amath
1.8.5
Simple command line calculator
|
#include <operators.h>
Public Member Functions | |
UnaryNode (ExpressionNode *expression) | |
~UnaryNode () | |
ReductionType | GetReductionType () |
int | GetPrecedence () |
SyntaxNode * | GetNext () |
char * | GetText () |
Number * | Evaluate () |
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 void | ResetIterator () |
Protected Member Functions | |
char * | GetNodeText () |
Private Attributes | |
ExpressionNode * | expression |
Additional Inherited Members | |
Protected Attributes inherited from ExpressionNode | |
Number * | result |
Protected Attributes inherited from SyntaxNode | |
CharBuffer * | output |
SyntaxNode * | parent |
SyntaxNode * | iterator |
bool | leftBottom |
Definition at line 42 of file operators.h.
UnaryNode::UnaryNode | ( | ExpressionNode * | expression | ) |
Definition at line 39 of file operators.cpp.
References expression, and ExpressionNode::ExpressionNode().
Referenced by Parser::ParseUnary().
UnaryNode::~UnaryNode | ( | ) |
|
virtual |
Implements SyntaxNode.
Definition at line 109 of file operators.cpp.
References expression, and SyntaxNode::SetParent().
|
virtual |
|
virtual |
Implements ExpressionNode.
Definition at line 92 of file operators.cpp.
References ExpressionNode::Evaluate(), expression, ExpressionNode::result, and Number::Unary().
|
virtual |
Implements SyntaxNode.
Definition at line 98 of file operators.cpp.
References expression, and SyntaxNode::iterator.
|
protectedvirtual |
Implements ExpressionNode.
Definition at line 62 of file operators.cpp.
Referenced by GetText().
|
virtual |
Implements ExpressionNode.
Definition at line 57 of file operators.cpp.
Referenced by GetText().
|
virtual |
|
virtual |
Implements ExpressionNode.
Definition at line 68 of file operators.cpp.
References CharBuffer::Append(), CharBuffer::Empty(), CharBuffer::EnsureSize(), expression, GetNodeText(), GetPrecedence(), ExpressionNode::GetPrecedence(), CharBuffer::GetString(), ExpressionNode::GetText(), SyntaxNode::output, and StrLen().
|
virtual |
|
private |
Definition at line 61 of file operators.h.
Referenced by Attach(), Detach(), Evaluate(), GetNext(), GetText(), Replace(), UnaryNode(), and ~UnaryNode().