JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

This class represents a binary arithmetic operation: add (+), subtract (-), multiply (*), divide (/), a to the power of b (a^b) More...

#include <jkqtpmathparser.h>

Inheritance diagram for JKQTPMathParser::jkmpBinaryArithmeticNode:
[legend]
Collaboration diagram for JKQTPMathParser::jkmpBinaryArithmeticNode:
[legend]

Public Member Functions

 jkmpBinaryArithmeticNode (char op, jkmpNode *l, jkmpNode *r, JKQTPMathParser *p, jkmpNode *par)
 constructor for a jkmpBinaryArithmeticNode
 
virtual ~jkmpBinaryArithmeticNode () override
 standard destructor, also destroy the children (recursively)

 
virtual jkmpResult evaluate () override
 evaluate this node
 
- Public Member Functions inherited from JKQTPMathParser::jkmpNode
 jkmpNode (JKQTPMathParser *parser_=nullptr, jkmpNode *parent_=nullptr)
 
virtual ~jkmpNode ()
 virtual class destructor
 
jkmpNodegetParent ()
 returns a pointer to the parent node
 
JKQTPMathParsergetParser ()
 return a pointer to the JKQTPMathParser

 
void setParent (jkmpNode *par)
 sets the parent node

 
void setParser (JKQTPMathParser *mp)
 set the JKQTPMathParser

 

Private Attributes

jkmpNodeleft
 
char operation
 
jkmpNoderight
 

Additional Inherited Members

- Protected Attributes inherited from JKQTPMathParser::jkmpNode
jkmpNodeparent
 points to the parent node
 
JKQTPMathParserparser
 points to the parser object that is used to evaluate this node
 

Detailed Description

This class represents a binary arithmetic operation: add (+), subtract (-), multiply (*), divide (/), a to the power of b (a^b)

Constructor & Destructor Documentation

◆ jkmpBinaryArithmeticNode()

JKQTPMathParser::jkmpBinaryArithmeticNode::jkmpBinaryArithmeticNode ( char  op,
jkmpNode l,
jkmpNode r,
JKQTPMathParser p,
jkmpNode par 
)

constructor for a jkmpBinaryArithmeticNode

Parameters
opthe operation to be performed: add (+), subtract (-), multiply (*), divide (/), a to the power of b (a^b)
lleft child node/operand
rright child node/operand
pa pointer to a JKQTPMathParser object
para pointer to the parent node

◆ ~jkmpBinaryArithmeticNode()

virtual JKQTPMathParser::jkmpBinaryArithmeticNode::~jkmpBinaryArithmeticNode ( )
overridevirtual

standard destructor, also destroy the children (recursively)

Member Function Documentation

◆ evaluate()

virtual jkmpResult JKQTPMathParser::jkmpBinaryArithmeticNode::evaluate ( )
overridevirtual

evaluate this node

Implements JKQTPMathParser::jkmpNode.

Member Data Documentation

◆ left

jkmpNode* JKQTPMathParser::jkmpBinaryArithmeticNode::left
private

◆ operation

char JKQTPMathParser::jkmpBinaryArithmeticNode::operation
private

◆ right

jkmpNode * JKQTPMathParser::jkmpBinaryArithmeticNode::right
private

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