Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::LuaTriggerManager Class Reference

Lua Trigger Manager. More...

#include <>>

List of all members.

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).

Author:
Tim Niemueller

Definition at line 30 of file trigger.h.


Constructor & Destructor Documentation

fawkes::LuaTriggerManager::LuaTriggerManager ( LuaContext lua,
const char *  trigger_var 
)

Constructor.

Parameters:
luaLua context to use that has a running trigger system
trigger_varthe 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.


Member Function Documentation

void fawkes::LuaTriggerManager::trigger ( const char *  event,
const char *  param_format = 0,
  ... 
)

Cause a trigger event.

Parameters:
eventname of the event to trigger
param_formata 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}
which would result in a table set with the two floats you provide in the ellipsis.

Definition at line 73 of file trigger.cpp.

References fawkes::LuaContext::do_string().


The documentation for this class was generated from the following files: