Public Member Functions | Protected Attributes | List of all members
CustomFunction Class Referenceabstract

#include <custom_function.h>

Inheritance diagram for CustomFunction:
Inheritance graph
[legend]

Public Member Functions

QString aliasName () const
 
void calculate () override
 
void calculateAndAdd (PlotDataMapRef &src_data)
 
virtual void calculatePoints (const std::vector< const PlotData * > &src_data, size_t point_index, std::vector< PlotData::Point > &new_points)=0
 
 CustomFunction (SnippetData snippet={})
 
virtual void initEngine ()=0
 
virtual QString language () const =0
 
int numInputs () const override
 
int numOutputs () const override
 
void reset () override
 
void setSnippet (const SnippetData &snippet)
 
const SnippetDatasnippet () const
 
bool xmlLoadState (const QDomElement &parent_element) override
 Override this method to load the status of the plugin from XML. More...
 
bool xmlSaveState (QDomDocument &doc, QDomElement &parent_element) const override
 Override this method to save the status of the plugin to XML. More...
 
- Public Member Functions inherited from PJ::TransformFunction
std::vector< const PlotData * > & dataSources ()
 
virtual const char * name () const =0
 Name of the plugin type, NOT the particular instance. More...
 
unsigned order () const
 
PlotDataMapRefplotData ()
 
virtual void setData (PlotDataMapRef *data, const std::vector< const PlotData * > &src_vect, std::vector< PlotData * > &dst_vect)
 
 TransformFunction ()
 
virtual ~TransformFunction ()=default
 
- Public Member Functions inherited from PJ::PlotJugglerPlugin
virtual const std::vector< QAction * > & availableActions ()
 
virtual bool isDebugPlugin ()
 
virtual QWidget * optionsWidget ()
 optionsWidget pointer to a persistent widget used to set the plugin options . More...
 
 PlotJugglerPlugin ()=default
 
QDomElement xmlSaveState (QDomDocument &doc) const
 

Protected Attributes

std::string _linked_plot_name
 
std::string _plot_name
 
SnippetData _snippet
 
std::vector< std::string > _used_channels
 
- Protected Attributes inherited from PJ::TransformFunction
PlotDataMapRef_data
 
std::vector< PlotData * > _dst_vector
 
unsigned _order
 
std::vector< const PlotData * > _src_vector
 

Additional Inherited Members

- Public Types inherited from PJ::TransformFunction
using Ptr = std::shared_ptr< TransformFunction >
 
- Signals inherited from PJ::TransformFunction
void parametersChanged ()
 

Detailed Description

Definition at line 40 of file custom_function.h.

Constructor & Destructor Documentation

◆ CustomFunction()

CustomFunction::CustomFunction ( SnippetData  snippet = {})

Definition at line 9 of file custom_function.cpp.

Member Function Documentation

◆ aliasName()

QString CustomFunction::aliasName ( ) const
inline

Definition at line 59 of file custom_function.h.

◆ calculate()

void CustomFunction::calculate ( )
overridevirtual

Implements PJ::TransformFunction.

Definition at line 69 of file custom_function.cpp.

◆ calculateAndAdd()

void CustomFunction::calculateAndAdd ( PlotDataMapRef src_data)

Definition at line 33 of file custom_function.cpp.

◆ calculatePoints()

virtual void CustomFunction::calculatePoints ( const std::vector< const PlotData * > &  src_data,
size_t  point_index,
std::vector< PlotData::Point > &  new_points 
)
pure virtual

Implemented in LuaCustomFunction.

◆ initEngine()

virtual void CustomFunction::initEngine ( )
pure virtual

Implemented in LuaCustomFunction.

◆ language()

virtual QString CustomFunction::language ( ) const
pure virtual

Implemented in LuaCustomFunction.

◆ numInputs()

int CustomFunction::numInputs ( ) const
inlineoverridevirtual

Number of inputs. Return -1 if it is not a constant.

When numInputs() > 0, then the data will be initialized using the method: setDataSource(const std::vector<const PlotData*>& src_data)

When numInputs() == -1, then the number of inputs is undefined and the data will be initialized using the method_ setDataSource( PlotDataMapRef* data )

Implements PJ::TransformFunction.

Definition at line 49 of file custom_function.h.

◆ numOutputs()

int CustomFunction::numOutputs ( ) const
inlineoverridevirtual

Number of outputs. Define the size of the vector used in: calculate(std::vector<PlotData*>& dst_data)

Implements PJ::TransformFunction.

Definition at line 54 of file custom_function.h.

◆ reset()

void CustomFunction::reset ( )
overridevirtual

Clear the cache, state and any stored data

Reimplemented from PJ::TransformFunction.

Definition at line 27 of file custom_function.cpp.

◆ setSnippet()

void CustomFunction::setSnippet ( const SnippetData snippet)

Definition at line 14 of file custom_function.cpp.

◆ snippet()

const SnippetData & CustomFunction::snippet ( ) const

Definition at line 64 of file custom_function.cpp.

◆ xmlLoadState()

bool CustomFunction::xmlLoadState ( const QDomElement &  parent_element)
overridevirtual

Override this method to load the status of the plugin from XML.

Reimplemented from PJ::PlotJugglerPlugin.

Reimplemented in LuaCustomFunction.

Definition at line 126 of file custom_function.cpp.

◆ xmlSaveState()

bool CustomFunction::xmlSaveState ( QDomDocument &  doc,
QDomElement &  parent_element 
) const
overridevirtual

Override this method to save the status of the plugin to XML.

Reimplemented from PJ::PlotJugglerPlugin.

Definition at line 120 of file custom_function.cpp.

Member Data Documentation

◆ _linked_plot_name

std::string CustomFunction::_linked_plot_name
protected

Definition at line 84 of file custom_function.h.

◆ _plot_name

std::string CustomFunction::_plot_name
protected

Definition at line 85 of file custom_function.h.

◆ _snippet

SnippetData CustomFunction::_snippet
protected

Definition at line 83 of file custom_function.h.

◆ _used_channels

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

Definition at line 87 of file custom_function.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:28