OpenCurves  0.9
FunctionMAvg Class Reference

A function which evaluates a moving average. More...

#include <functionmavg.h>

Inheritance diagram for FunctionMAvg:
FunctionDefinition

Public Member Functions

 FunctionMAvg (const QString &category=QString())
 Constructor. More...
 
void evaluate (PlotFunctionResult &result, double time, unsigned int argc, const double *argv, const PlotFunctionInfo &info, void *context) const override
 Updates the window and evaluates the average on that window.
 
void * createContext () const override
 Creates the history object.
 
void destroyContext (void *context) const override
 Destroys the history object.
 
- Public Member Functions inherited from FunctionDefinition
 FunctionDefinition (const QString &category, const QString &name, unsigned argc=0, bool variadic=false)
 Construct a function definition. More...
 
 FunctionDefinition (const QString &category, const QString &name, const QString &description, unsigned argc=0, bool variadic=false)
 Construct a function definition. More...
 
virtual ~FunctionDefinition ()
 Virtual destructor.
 
const QString & category () const
 Access the function categorisation for UI grouping. More...
 
void setCategory (const QString &category)
 Set the category name for the function. More...
 
const QString & name () const
 Access the function name as used by the expression generator. More...
 
void setName (const QString &name)
 Set the function name as used by the generator. More...
 
const QString & displayName () const
 Return the function name as displayed with the user. More...
 
void setDisplayName (const QString &name)
 Set the function name as displayed to the user. More...
 
const QString & description () const
 Access the function description. More...
 
void setDesciption (const QString &description)
 Set the function description. More...
 
unsigned argc () const
 Access the minimum argument count. More...
 
void setArgc (unsigned count)
 Set the minimum required arguments. More...
 
bool variadic () const
 Is the function variadic beyond argc()? More...
 
void setVariadic (bool variadic)
 Set the variadic flag. More...
 
QString deduceDisplayName () const
 Deduces the display name of the function to show usage. More...
 

Detailed Description

A function which evaluates a moving average.

This functions uses context data to maintain a windowed history, reporting the average of the window.

Constructor & Destructor Documentation

FunctionMAvg::FunctionMAvg ( const QString &  category = QString())

Constructor.

Parameters
categorySorting category.

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