Fawkes API
Fawkes Development Version
|
Lua Trigger Manager. More...
#include <>>
Public Member Functions | |
LuaTriggerManager (LuaContext *lua, const char *trigger_var) | |
Constructor. More... | |
~LuaTriggerManager () | |
Destructor. More... | |
void | trigger (const char *event, const char *param_format=0,...) |
Cause a trigger event. More... | |
Lua Trigger Manager.
This class interfaces with a trigger sub-system running inside Lua (with the trigger system provided by Fawkes' Lua packages).
fawkes::LuaTriggerManager::LuaTriggerManager | ( | LuaContext * | lua, |
const char * | trigger_var | ||
) |
Constructor.
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 | ( | ) |
Destructor.
Definition at line 54 of file trigger.cpp.
void fawkes::LuaTriggerManager::trigger | ( | const char * | event, |
const char * | param_format = 0 , |
||
... | |||
) |
Cause a trigger event.
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 {x=%f, y=%f} |
Definition at line 73 of file trigger.cpp.
References fawkes::LuaContext::do_string().