fawkes::LuaTriggerManager Class Reference
Lua Trigger Manager. More...
#include <lua/trigger.h>
Public Member Functions | |
| LuaTriggerManager (LuaContext *lua, const char *trigger_var) | |
| Constructor. | |
| ~LuaTriggerManager () | |
| Destructor. | |
| void | trigger (const char *event, const char *param_format=0,...) |
| Cause a trigger event. | |
Detailed Description
Lua Trigger Manager.This class interfaces with a trigger sub-system running inside Lua (with the trigger system provided by Fawkes' Lua packages).
Definition at line 30 of file trigger.h.
Constructor & Destructor Documentation
| fawkes::LuaTriggerManager::LuaTriggerManager | ( | LuaContext * | lua, | |
| const char * | trigger_var | |||
| ) |
Constructor.
- Parameters:
-
lua Lua context to use that has a running trigger system trigger_var the name of the (global) variable pointing to the trigger system
Definition at line 46 of file trigger.cpp.
| fawkes::LuaTriggerManager::~LuaTriggerManager | ( | ) |
Member Function Documentation
| void fawkes::LuaTriggerManager::trigger | ( | const char * | event, | |
| const char * | param_format = 0, |
|||
| ... | ||||
| ) |
Cause a trigger event.
- Parameters:
-
event name of the event to trigger param_format a format string for a string passed plain as Lua code in the trigger() function call as second argument. The code executed looks like "lua_trigger_var:trigger(event, string)" with string being what you pass, so it can be any number of arguments, for instance you could pass which would result in a table set with the two floats you provide in the ellipsis.{x=%f, y=%f}
Definition at line 73 of file trigger.cpp.
References fawkes::LuaContext::do_string().
The documentation for this class was generated from the following files:
- src/libs/lua/trigger.h
- src/libs/lua/trigger.cpp

