PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
lua_event.h
1 #ifndef LUAEVENT_H
2 #define LUAEVENT_H
3 
4 
5 #include <QString>
6 #include <QVariantList>
7 
8 #include <luabind/luabind.hpp>
9 #include <lua_inclues/lua.hpp>
10 
11 class LuaEngine;
12 
13 class LuaEvent{
14 
15  friend class LuaEngine;
16 private:
17 
18  std::string m_eventName;
19  LuaEngine* m_engine;
20 
21  lua_State* getNativeState();
22 
23 protected:
24  std::vector<luabind::object> objList;
25 public:
26  LuaEvent(LuaEngine* engine);
27  std::string eventName() const;
28  void setEventName(const std::string &eventName);
29 
30  template<typename T>
31  void addParameter(T par){
32  objList.emplace_back(getNativeState(), par);
33  }
34  void cleanupAllParams();
35 
36  static luabind::scope bindToLua();
37 
38 };
39 
40 
41 
42 
43 #endif // LUAEVENT_H
44 
45 
This class should have basic functions for interacting with lua To run the lua engine you have to con...
Definition: lua_engine.h:27
Definition: lua_event.h:13