Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CustomFunction Class Reference

#include <custom_function.h>

Public Member Functions

void calculate (const PlotDataMapRef &plotData, PlotData *dst_data)
 
void calculateAndAdd (PlotDataMapRef &plotData)
 
 CustomFunction (const std::string &linkedPlot, const std::string &plotName, const QString &globalVars, const QString &function)
 
 CustomFunction (const std::string &linkedPlot, const SnippetData &snippet)
 
const QString & function () const
 
const QString & globalVars () const
 
const std::string & linkedPlotName () const
 
const std::string & name () const
 
QDomElement xmlSaveState (QDomDocument &doc) const
 

Static Public Member Functions

static CustomPlotPtr createFromXML (QDomElement &element)
 
static QStringList getChannelsFromFuntion (const QString &function)
 

Private Member Functions

PlotData::Point calculatePoint (QJSValue &calcFct, const PlotData &src_data, const std::vector< const PlotData * > &channels_data, QJSValue &chan_values, size_t point_index)
 
void initJsEngine ()
 

Private Attributes

const QString _function
 
QString _function_replaced
 
const QString _global_vars
 
std::unique_ptr< QJSEngine > _jsEngine
 
double _last_updated_timestamp
 
const std::string _linked_plot_name
 
const std::string _plot_name
 
std::vector< std::string > _used_channels
 

Detailed Description

Definition at line 32 of file custom_function.h.

Constructor & Destructor Documentation

CustomFunction::CustomFunction ( const std::string &  linkedPlot,
const std::string &  plotName,
const QString &  globalVars,
const QString &  function 
)

Definition at line 39 of file custom_function.cpp.

CustomFunction::CustomFunction ( const std::string &  linkedPlot,
const SnippetData snippet 
)

Definition at line 8 of file custom_function.cpp.

Member Function Documentation

void CustomFunction::calculate ( const PlotDataMapRef plotData,
PlotData dst_data 
)

Definition at line 161 of file custom_function.cpp.

void CustomFunction::calculateAndAdd ( PlotDataMapRef plotData)

Definition at line 86 of file custom_function.cpp.

PlotData::Point CustomFunction::calculatePoint ( QJSValue &  calcFct,
const PlotData src_data,
const std::vector< const PlotData * > &  channels_data,
QJSValue &  chan_values,
size_t  point_index 
)
private

Definition at line 126 of file custom_function.cpp.

CustomPlotPtr CustomFunction::createFromXML ( QDomElement &  element)
static

Definition at line 251 of file custom_function.cpp.

const QString & CustomFunction::function ( ) const

Definition at line 224 of file custom_function.cpp.

QStringList CustomFunction::getChannelsFromFuntion ( const QString &  function)
static

Definition at line 17 of file custom_function.cpp.

const QString & CustomFunction::globalVars ( ) const

Definition at line 219 of file custom_function.cpp.

void CustomFunction::initJsEngine ( )
private

Definition at line 113 of file custom_function.cpp.

const std::string & CustomFunction::linkedPlotName ( ) const

Definition at line 214 of file custom_function.cpp.

const std::string & CustomFunction::name ( ) const

Definition at line 209 of file custom_function.cpp.

QDomElement CustomFunction::xmlSaveState ( QDomDocument &  doc) const

Definition at line 231 of file custom_function.cpp.

Member Data Documentation

const QString CustomFunction::_function
private

Definition at line 73 of file custom_function.h.

QString CustomFunction::_function_replaced
private

Definition at line 74 of file custom_function.h.

const QString CustomFunction::_global_vars
private

Definition at line 72 of file custom_function.h.

std::unique_ptr<QJSEngine> CustomFunction::_jsEngine
private

Definition at line 77 of file custom_function.h.

double CustomFunction::_last_updated_timestamp
private

Definition at line 78 of file custom_function.h.

const std::string CustomFunction::_linked_plot_name
private

Definition at line 70 of file custom_function.h.

const std::string CustomFunction::_plot_name
private

Definition at line 71 of file custom_function.h.

std::vector<std::string> CustomFunction::_used_channels
private

Definition at line 75 of file custom_function.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18