philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Symbolic Class Reference

#include <Operand.h>

Inheritance diagram for Symbolic:
Operand MathNode

Public Member Functions

 Symbolic (const std::string &name, double defaultValue=0.0)
 
 Symbolic (const Symbolic &other)
 
double Evaluate () const override
 
- Public Member Functions inherited from Operand
 Operand (const std::string &name)
 
- Public Member Functions inherited from MathNode
 MathNode (const std::string &val)
 
 MathNode (const MathNode &other)
 
virtual double Evaluate () const =0
 
std::string GetString () const
 
bool operator== (MathNode *rhs)
 

Public Attributes

double evaluationValue = 1.0
 value which replaces symbol during evaluation More...
 
- Public Attributes inherited from MathNode
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< MathNodeleft = nullptr
 next node on left side More...
 
std::shared_ptr< MathNoderight = nullptr
 next node on right side More...
 
char * value {}
 char representation of value More...
 

Additional Inherited Members

- Protected Attributes inherited from MathNode
size_t valSize = 0
 helper to store size of value More...
 

Detailed Description

Symbolic representation as node holds a variable symbol. Set evaluationValue prior to calling Evaluate to compute desired value

Constructor & Destructor Documentation

◆ Symbolic() [1/2]

Symbolic::Symbolic ( const std::string &  name,
double  defaultValue = 0.0 
)
inlineexplicit

default constructor

Parameters
name

◆ Symbolic() [2/2]

Symbolic::Symbolic ( const Symbolic other)
inline

copy constructor

Parameters
other

Member Function Documentation

◆ Evaluate()

double Symbolic::Evaluate ( ) const
inlineoverridevirtual

returns given evaluation value

Returns

Implements MathNode.

Member Data Documentation

◆ evaluationValue

double Symbolic::evaluationValue = 1.0

value which replaces symbol during evaluation


The documentation for this class was generated from the following file: