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

#include <lua_custom_function.h>

Inheritance diagram for LuaCustomFunction:
Inheritance graph
[legend]

Public Member Functions

void calculatePoints (const std::vector< const PlotData * > &channels_data, size_t point_index, std::vector< PlotData::Point > &points) override
 
std::string getError (sol::error err)
 
void initEngine () override
 
QString language () const override
 
 LuaCustomFunction (SnippetData snippet={})
 
const char * name () const override
 Name of the plugin type, NOT the particular instance. More...
 
bool xmlLoadState (const QDomElement &parent_element) override
 Override this method to load the status of the plugin from XML. More...
 
- Public Member Functions inherited from CustomFunction
QString aliasName () const
 
void calculate () override
 
void calculateAndAdd (PlotDataMapRef &src_data)
 
 CustomFunction (SnippetData snippet={})
 
int numInputs () const override
 
int numOutputs () const override
 
void reset () override
 
void setSnippet (const SnippetData &snippet)
 
const SnippetDatasnippet () const
 
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 ()
 
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
 

Private Attributes

std::vector< double > _chan_values
 
sol::state _lua_engine
 
sol::protected_function _lua_function
 
int function_lines_ = 0
 
int global_lines_ = 0
 
std::mutex mutex_
 

Additional Inherited Members

- Public Types inherited from PJ::TransformFunction
using Ptr = std::shared_ptr< TransformFunction >
 
- Signals inherited from PJ::TransformFunction
void parametersChanged ()
 
- Protected Attributes inherited from CustomFunction
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
 

Detailed Description

Definition at line 9 of file lua_custom_function.h.

Constructor & Destructor Documentation

◆ LuaCustomFunction()

LuaCustomFunction::LuaCustomFunction ( SnippetData  snippet = {})

Definition at line 4 of file lua_custom_function.cpp.

Member Function Documentation

◆ calculatePoints()

void LuaCustomFunction::calculatePoints ( const std::vector< const PlotData * > &  channels_data,
size_t  point_index,
std::vector< PlotData::Point > &  points 
)
overridevirtual

Implements CustomFunction.

Definition at line 55 of file lua_custom_function.cpp.

◆ getError()

std::string LuaCustomFunction::getError ( sol::error  err)

Definition at line 169 of file lua_custom_function.cpp.

◆ initEngine()

void LuaCustomFunction::initEngine ( )
overridevirtual

Implements CustomFunction.

Definition at line 25 of file lua_custom_function.cpp.

◆ language()

QString LuaCustomFunction::language ( ) const
inlineoverridevirtual

Implements CustomFunction.

Definition at line 19 of file lua_custom_function.h.

◆ name()

const char* LuaCustomFunction::name ( ) const
inlineoverridevirtual

Name of the plugin type, NOT the particular instance.

Implements PJ::TransformFunction.

Definition at line 24 of file lua_custom_function.h.

◆ xmlLoadState()

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

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

Reimplemented from CustomFunction.

Definition at line 162 of file lua_custom_function.cpp.

Member Data Documentation

◆ _chan_values

std::vector<double> LuaCustomFunction::_chan_values
private

Definition at line 36 of file lua_custom_function.h.

◆ _lua_engine

sol::state LuaCustomFunction::_lua_engine
private

Definition at line 34 of file lua_custom_function.h.

◆ _lua_function

sol::protected_function LuaCustomFunction::_lua_function
private

Definition at line 35 of file lua_custom_function.h.

◆ function_lines_

int LuaCustomFunction::function_lines_ = 0
private

Definition at line 39 of file lua_custom_function.h.

◆ global_lines_

int LuaCustomFunction::global_lines_ = 0
private

Definition at line 38 of file lua_custom_function.h.

◆ mutex_

std::mutex LuaCustomFunction::mutex_
private

Definition at line 37 of file lua_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:29