$search

fawkes::LuaContextWatcher Class Reference

#include <context_watcher.h>

List of all members.

Public Member Functions

virtual void lua_finalize (LuaContext *context)=0
virtual void lua_init (LuaContext *context)=0
virtual void lua_restarted (LuaContext *context)=0
virtual ~LuaContextWatcher ()

Detailed Description

Lua context watcher. This interface allows for notification of LuaContext events.

Author:
Tim Niemueller

Definition at line 38 of file context_watcher.h.


Constructor & Destructor Documentation

fawkes::LuaContextWatcher::~LuaContextWatcher (  )  [virtual]

Virtual empty destructor.

Definition at line 73 of file context_watcher.cpp.


Member Function Documentation

void fawkes::LuaContextWatcher::lua_finalize ( LuaContext context  )  [pure virtual]

Lua finalize event. This is called when the LuaContext is being restarted to finalize the old context. It is executed after the new context has been successfully initialized and can be used to perform any necessary finalization, e.g. closing network connections. Exceptions are ignored, so handle them in the finalizer.

Parameters:
context This is a temporary LuaContext that is valid as long as the method is executed. It may be used only for the duration of the method call and may not be stored for later use.
virtual void fawkes::LuaContextWatcher::lua_init ( LuaContext context  )  [pure virtual]
void fawkes::LuaContextWatcher::lua_restarted ( LuaContext context  )  [pure virtual]

Lua init event. This is called when the LuaContext is initialized. It is executed after all packages have been loaded and variables have been set, but before the start script is run. The implementation may throw an exception if anything prevents it from using the new context properly.

Parameters:
context This is a temporary LuaContext that is valid as long as the method is executed. It is a wrapper context around the new Lua state, just before the start script is run and it the calling context is switched to the new state (if no error occurs).

Lua restart event. This is called when the LuaContext has been restarted and the new state has been successfully initialized and start script has been run, the old state has been finalized, and the states have been swapped. You can use this hook to run commands on the fully initialized Lua state on a successful restart.

Parameters:
context This is a temporary LuaContext that is valid as long as the method is executed. It may be used only for the duration of the method call and may not be stored for later use.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


lua_utils
Author(s): Tim Niemueller
autogenerated on Tue Mar 5 12:26:31 2013