aboutsummaryrefslogtreecommitdiffstats
path: root/include/systems
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-10-16 18:43:06 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-10-16 18:43:06 -0400
commit2bd1eaef1b9ec848933a40049ec8866e2b83a47d (patch)
tree714a018bdc4b42aa1e9bcac5270190d068cf177b /include/systems
parent07b3ae994d0e68b5c266f5aa212024d5064847c2 (diff)
do not touch birb
Diffstat (limited to 'include/systems')
-rw-r--r--include/systems/lua.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/systems/lua.hpp b/include/systems/lua.hpp
index 1137308..cb859ad 100644
--- a/include/systems/lua.hpp
+++ b/include/systems/lua.hpp
@@ -7,6 +7,8 @@
#include <vector>
using LuaVariable = std::tuple<std::string, float&>;
+using LuaList = std::vector<LuaVariable>;
+using LuaRetList = std::vector<double>;
class LuaScript {
private:
@@ -14,7 +16,7 @@ private:
std::string script;
void setGlobal(const LuaVariable&) const;
- void getReturns(std::vector<double>& rets) const;
+ void getReturns(LuaRetList& rets) const;
static void replace(std::string& s, const std::string& rid, const std::string& put) {
for (unsigned int i = 0; i < s.size(); i++) {
@@ -45,10 +47,10 @@ public:
}
void operator()(const std::string& func = "update") const;
- void operator()(const std::string& func, std::vector<LuaVariable> vars) const;
- void operator()(const std::string& func, std::vector<double>& rets, std::vector<LuaVariable> vars) const;
- void operator()(std::vector<LuaVariable> vars) const;
- void operator()(std::vector<double>& rets, std::vector<LuaVariable> vars) const;
+ void operator()(const std::string& func, LuaList vars) const;
+ void operator()(const std::string& func, LuaRetList& rets, LuaList vars) const;
+ void operator()(LuaList vars) const;
+ void operator()(LuaRetList& rets, LuaList vars) const;
};
class LuaSystem {