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  void calculatePoints(const std::vector<const PlotData*>& channels_data,
15  size_t point_index, std::vector<PlotData::Point>& points) override;
16 
17  QString language() const override
18  {
19  return "LUA";
20  }
21 
22  const char* name() const override
23  {
24  return "LuaCustomFunction";
25  }
26 
27  bool xmlLoadState(const QDomElement& parent_element) override;
28 
29  std::string getError(sol::error err);
30 
31 private:
34  std::vector<double> _chan_values;
35  std::mutex mutex_;
36  int global_lines_ = 0;
37  int function_lines_ = 0;
38 };
39 
40 #endif // LUA_CUSTOM_FUNCTION_H
std::string getError(sol::error err)
std::vector< double > _chan_values
LuaCustomFunction(SnippetData snippet={})
sol::protected_function _lua_function
bool xmlLoadState(const QDomElement &parent_element) override
Override this method to load the status of the plugin from XML.
const char * name() const override
Name of the plugin type, NOT the particular instance.
void initEngine() override
void calculatePoints(const std::vector< const PlotData *> &channels_data, size_t point_index, std::vector< PlotData::Point > &points) override
QString language() const override
const SnippetData & snippet() const


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38