philsupertramp/game-math
|
#include <MathNode.h>
Public Member Functions | |
MathNode (const std::string &val) | |
MathNode (const MathNode &other) | |
virtual double | Evaluate () const =0 |
std::string | GetString () const |
bool | operator== (MathNode *rhs) |
Public Attributes | |
bool | isNegative = false |
helper to determine whether a node is negated or not More... | |
bool | hasParentheses = false |
helper to determine if node is within parentheses More... | |
MathNodeType | type |
node type representation More... | |
NodeConnectionType | connectionType = NodeConnectionType::ConnectionType_Dual |
type of connection allowed for this node More... | |
std::shared_ptr< MathNode > | left = nullptr |
next node on left side More... | |
std::shared_ptr< MathNode > | right = nullptr |
next node on right side More... | |
char * | value {} |
char representation of value More... | |
Protected Attributes | |
size_t | valSize = 0 |
helper to store size of value More... | |
Friends | |
bool | operator== (const MathNode &lhs, const MathNode &rhs) |
std::ostream & | operator<< (std::ostream &ostr, const MathNode &other) |
std::ostream & | operator<< (std::ostream &ostr, MathNode *other) |
Base node type of Abstract syntax tree implementation
|
inlineexplicit |
Default constructor
val |
|
inline |
Copy constructor
other |
|
pure virtual |
|
inline |
Getter for string representation of node
|
inline |
|
friend |
beautified output operator
ostr | |
other |
|
friend |
beautified output operator
ostr | |
other |
NodeConnectionType MathNode::connectionType = NodeConnectionType::ConnectionType_Dual |
type of connection allowed for this node
bool MathNode::hasParentheses = false |
helper to determine if node is within parentheses
bool MathNode::isNegative = false |
helper to determine whether a node is negated or not
std::shared_ptr<MathNode> MathNode::left = nullptr |
next node on left side
std::shared_ptr<MathNode> MathNode::right = nullptr |
next node on right side
MathNodeType MathNode::type |
node type representation
|
protected |
helper to store size of value
char* MathNode::value {} |
char representation of value