Fawkes API  Fawkes Development Version
fawkes::LuaContextWatcher Class Referenceabstract

Lua context watcher. More...

#include <>>

Inheritance diagram for fawkes::LuaContextWatcher:

Public Member Functions

virtual ~LuaContextWatcher ()
 Virtual empty destructor. More...
 
virtual void lua_restarted (LuaContext *context)=0
 Lua restart event. More...
 

Detailed Description

Lua context watcher.

This interface allows for notification of LuaContext events.

Author
Tim Niemueller

Definition at line 33 of file context_watcher.h.

Constructor & Destructor Documentation

◆ ~LuaContextWatcher()

fawkes::LuaContextWatcher::~LuaContextWatcher ( )
virtual

Virtual empty destructor.

Definition at line 49 of file context_watcher.cpp.

Member Function Documentation

◆ lua_restarted()

void fawkes::LuaContextWatcher::lua_restarted ( LuaContext context)
pure virtual

Lua restart event.

This is called when the LuaContext has been restarted, for example when file watching is enabled and a file changed. 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
contextThis 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).

Implemented in fawkes::LuaInterfaceImporter, and SkillerExecutionThread.


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