OpenCurves  0.9
PlotUnaryOperator Class Reference

An extension of PlotExpression defining a unary operation. More...

#include <plotunaryoperator.h>

Inheritance diagram for PlotUnaryOperator:
PlotExpression PlotBracketExpression PlotUnaryOperatorT< Operator > PlotUnaryOperatorT< std::negate< double > > PlotNegate

Public Member Functions

 PlotUnaryOperator (PlotExpression *operand)
 Create a binary operator on the given left and right expressions. More...
 
 ~PlotUnaryOperator ()
 Destructor, destroying the child.
 
void setOperand (PlotExpression *operand)
 Set the operand expression. More...
 
const PlotExpressionoperand () const
 Get the operand expression. More...
 
virtual BindResult bind (const QList< PlotInstance * > &curves, PlotBindingTracker &bindTracker, PlotExpressionBindDomain &domain, bool repeatLastBinding=false)
 Binds the operand expression.
 
virtual void unbind ()
 Unbind the operand.
 
bool explicitTime () const override
 Is the generated expression sensitive to changes in the time domain? More...
 
- Public Member Functions inherited from PlotExpression
 PlotExpression ()
 Empty constructor.
 
virtual ~PlotExpression ()
 Empty, virtual destructor.
 
virtual double sample (double sampleTime) const =0
 Called to generate a sample at sampleTime. More...
 
virtual PlotExpressionclone () const =0
 Performs a deep clone of the PlotExpression. More...
 
QString toString () const
 Converts the PlotExpression into a parseable string form. More...
 

Detailed Description

An extension of PlotExpression defining a unary operation.

This tracks the child and manages binding, but derivations are required to implement the sample() function.

Constructor & Destructor Documentation

PlotUnaryOperator::PlotUnaryOperator ( PlotExpression operand)
inline

Create a binary operator on the given left and right expressions.

Parameters
operandThe child expression.

Member Function Documentation

bool PlotUnaryOperator::explicitTime ( ) const
overridevirtual

Is the generated expression sensitive to changes in the time domain?

Returns
True if the child returns true.

Reimplemented from PlotExpression.

const PlotExpression* PlotUnaryOperator::operand ( ) const
inline
void PlotUnaryOperator::setOperand ( PlotExpression operand)
inline

Set the operand expression.

Does not release the existing expression.

Parameters
operandThe new operand.

References operand().


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