OpenCurves
0.9
|
An extension of PlotExpression
defining a binary operation.
More...
#include <plotbinaryoperator.h>
Public Member Functions | |
PlotBinaryOperator (PlotExpression *left, PlotExpression *right) | |
Create a binary operator on the given left and right expressions. More... | |
~PlotBinaryOperator () | |
Destructor, destroying left and right. | |
void | setLeft (PlotExpression *left) |
Set the left branch. More... | |
const PlotExpression * | left () const |
Get the left branch. More... | |
void | setRight (PlotExpression *right) |
Set the right branch. More... | |
const PlotExpression * | right () const |
Get the right branch. More... | |
virtual BindResult | bind (const QList< PlotInstance * > &curves, PlotBindingTracker &bindTracker, PlotExpressionBindDomain &domain, bool repeatLastBinding=false) |
Binds the left and right branch expressions. More... | |
virtual void | unbind () |
Unbind left and right branches. | |
bool | explicitTime () const override |
Is the generated expression sensitive to changes in the time domain? More... | |
![]() | |
PlotExpression () | |
Empty constructor. | |
virtual | ~PlotExpression () |
Empty, virtual destructor. | |
virtual double | sample (double sampleTime) const =0 |
Called to generate a sample at sampleTime . More... | |
virtual PlotExpression * | clone () const =0 |
Performs a deep clone of the PlotExpression . More... | |
QString | toString () const |
Converts the PlotExpression into a parseable string form. More... | |
An extension of PlotExpression
defining a binary operation.
This is essentially a binary in the expression tree.
This tracks the branches and manages binding, but derivations are required to implement the sample()
function.
|
inline |
Create a binary operator on the given left
and right
expressions.
left | The left expression. |
right | The right expression. |
|
virtual |
|
overridevirtual |
Is the generated expression sensitive to changes in the time domain?
Reimplemented from PlotExpression.
|
inline |
Get the left branch.
Referenced by PlotBinaryOperatorT< std::minus< double > >::clone(), PlotBinaryOperatorT< std::minus< double > >::sample(), and setLeft().
|
inline |
Get the right branch.
Referenced by PlotBinaryOperatorT< std::minus< double > >::clone(), PlotBinaryOperatorT< std::minus< double > >::sample(), and setRight().
|
inline |
Set the left branch.
Does not release the existing branch.
left | The new branch. |
References left().
|
inline |
Set the right branch.
Does not release the existing branch.
right | The new branch. |
References right().