lua_custom_function.h
Go to the documentation of this file.
1 #ifndef LUA_CUSTOM_FUNCTION_H
2 #define LUA_CUSTOM_FUNCTION_H
3 
4 #include "custom_function.h"
5 #include "sol.hpp"
6 
8 {
9 public:
11 
12  void initEngine() override;
13 
14  PlotData::Point calculatePoint(const PlotData& src_data,
15  const std::vector<const PlotData*>& channels_data,
16  size_t point_index) override;
17 
18  QString language() const override
19  {
20  return "LUA";
21  }
22 
23 private:
24  std::unique_ptr<sol::state> _lua_engine;
26  std::vector<double> _chan_values;
27 };
28 
29 #endif // LUA_CUSTOM_FUNCTION_H
LuaCustomFunction(const SnippetData &snippet)
std::vector< double > _chan_values
sol::protected_function _lua_function
void initEngine() override
PlotData::Point calculatePoint(const PlotData &src_data, const std::vector< const PlotData * > &channels_data, size_t point_index) override
std::unique_ptr< sol::state > _lua_engine
QString language() const override
const SnippetData & snippet() const
typename PlotDataBase< Value >::Point Point
Definition: plotdata.h:290


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:09