amath
1.8.5
Simple command line calculator
|
A rounding function in a syntax tree. More...
#include <round.h>
Public Member Functions | |
RoundNode (ExpressionNode *expression, char *text, char *sys) | |
Number * | Evaluate () |
Public Member Functions inherited from FunctionNode | |
FunctionNode (ExpressionNode *expression, char *text, char *sys) | |
~FunctionNode () | |
int | GetPrecedence () |
char * | GetText () |
virtual SyntaxNode * | GetNext () |
virtual void | Attach (SyntaxNode *node) |
virtual void | Detach (SyntaxNode *node) |
virtual 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 () |
Static Public Member Functions | |
static FunctionNode * | Create (ExpressionNode *expression, char *text, char *sys) |
Additional Inherited Members | |
Protected Member Functions inherited from FunctionNode | |
virtual char * | GetNodeText () |
Protected Attributes inherited from FunctionNode | |
ExpressionNode * | expression |
char * | name |
char * | sysname |
Protected Attributes inherited from ExpressionNode | |
Number * | result |
Protected Attributes inherited from SyntaxNode | |
CharBuffer * | output |
SyntaxNode * | parent |
SyntaxNode * | iterator |
bool | leftBottom |
A rounding function in a syntax tree.
Round to nearest integer. See Number for implementation.
More info on the rounding function is available at Wikipedia: https://wikipedia.org/wiki/Rounding
|
explicit |
Definition at line 32 of file round.cpp.
References FunctionNode::FunctionNode().
Referenced by Create().
|
static |
Definition at line 37 of file round.cpp.
References RoundNode().
|
virtual |
Implements ExpressionNode.
Definition at line 42 of file round.cpp.
References ExpressionNode::Evaluate(), FunctionNode::expression, ExpressionNode::result, and Number::Round().