![]() |
VR-Forces 4.0.4 Class Documentation
|
Manager for using Lua scripts. More...

Public Member Functions | |
| DtLuaScriptManager (DtCgf *cgf) | |
| constructor | |
| virtual | ~DtLuaScriptManager () |
| destructor | |
| virtual bool | initializeLua () |
| virtual bool | initializeVRFLuaExtensions (lua_State *L) |
| Initialize all global functions. | |
| virtual bool | initializeVRFObject (lua_State *L, DtVrfObject *vrfObject) |
| Initialize all functions in a VRF Object, putting it on top of the stack. | |
| virtual bool | initializeThisVRFObject (lua_State *L, DtVrfObject *vrfObject) |
| DtCgf * | getCgf () const |
| virtual void | reloadScriptForAllConcernedKynapseEntities (const DtString &scriptName, const DtString &scriptFullPath) |
Protected Member Functions | |
| virtual void | processRequestLuaScripts (DtSimMessage *msg) |
| virtual void | processRequestScriptText (DtSimMessage *msg) |
| virtual void | processSetScriptText (DtSimMessage *msg) |
| virtual void | processDeleteScript (DtSimMessage *msg) |
| virtual void | processObjectAdded (DtVrfObject *vrfObject) |
| when an object is added | |
| virtual void | processObjectRemoved (DtVrfObject *vrfObject) |
| remove it from the World | |
| virtual DtLuaScriptController * | createLuaComponent (DtVrfObject *vrfObject) |
| Add the Lua component to the passed entity. | |
| virtual void | sendScriptList () |
| Sends the current script list to the GUI. | |
| virtual std::vector< DtString > | scriptNamesOnDisk () |
| Returns the names of all the scripts available on the disk. | |
| virtual void | sendScriptText (const DtString &scriptName) |
| Sends the text of the specified script onto the network. | |
| virtual void | saveScriptText (const DtString &scriptName, const std::list< DtString > &scriptLines) |
| Saves the script to the disk. | |
| virtual bool | deleteScript (const DtString &scriptName) |
| Deletes the named script from the disk. | |
Static Protected Member Functions | |
| static void | requestLuaScriptsCallback (DtSimMessage *msg, void *usr) |
| static void | requestScriptTextCallback (DtSimMessage *msg, void *usr) |
| static void | setScriptTextCallback (DtSimMessage *msg, void *usr) |
| static void | deleteScriptCallback (DtSimMessage *msg, void *usr) |
| static void | objectAddedCallback (DtVrfObject *vrfObject, void *usr) |
| used as a static adapter to processObjectAdded | |
| static void | objectRemovedCallback (DtVrfObject *vrfObject, void *usr) |
| used as a static adapter to processObjectRemoved | |
Protected Attributes | |
| DtCgf * | myCgf |
| pointer to main VRF application | |
| DtLuaScriptDescriptor * | myLuaDescriptor |
Static Protected Attributes | |
| static struct luaL_reg | myVrfLib [] |
| static struct luaL_reg | myVrfObjLib [] |
| static struct luaL_reg | myThisVrfObjLib [] |
Manager for using Lua scripts.
This manager initializes Lua, as well as provides supporting functions for it.
constructor
| virtual vrfLua::DtLuaScriptManager::~DtLuaScriptManager | ( | ) | [virtual] |
destructor
| virtual bool vrfLua::DtLuaScriptManager::initializeLua | ( | ) | [virtual] |
| virtual bool vrfLua::DtLuaScriptManager::initializeVRFLuaExtensions | ( | lua_State * | L | ) | [virtual] |
Initialize all global functions.
Reimplemented in vrfLua::DtBhaveLuaScriptManager.
| virtual bool vrfLua::DtLuaScriptManager::initializeVRFObject | ( | lua_State * | L, |
| DtVrfObject * | vrfObject | ||
| ) | [virtual] |
Initialize all functions in a VRF Object, putting it on top of the stack.
| virtual bool vrfLua::DtLuaScriptManager::initializeThisVRFObject | ( | lua_State * | L, |
| DtVrfObject * | vrfObject | ||
| ) | [virtual] |
| DtCgf* vrfLua::DtLuaScriptManager::getCgf | ( | ) | const [inline] |
| virtual void vrfLua::DtLuaScriptManager::reloadScriptForAllConcernedKynapseEntities | ( | const DtString & | scriptName, |
| const DtString & | scriptFullPath | ||
| ) | [virtual] |
| static void vrfLua::DtLuaScriptManager::requestLuaScriptsCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
| virtual void vrfLua::DtLuaScriptManager::processRequestLuaScripts | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| static void vrfLua::DtLuaScriptManager::requestScriptTextCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
| virtual void vrfLua::DtLuaScriptManager::processRequestScriptText | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| static void vrfLua::DtLuaScriptManager::setScriptTextCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
| virtual void vrfLua::DtLuaScriptManager::processSetScriptText | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| static void vrfLua::DtLuaScriptManager::deleteScriptCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
| virtual void vrfLua::DtLuaScriptManager::processDeleteScript | ( | DtSimMessage * | msg | ) | [protected, virtual] |
| static void vrfLua::DtLuaScriptManager::objectAddedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static, protected] |
used as a static adapter to processObjectAdded
| virtual void vrfLua::DtLuaScriptManager::processObjectAdded | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
when an object is added
| static void vrfLua::DtLuaScriptManager::objectRemovedCallback | ( | DtVrfObject * | vrfObject, |
| void * | usr | ||
| ) | [static, protected] |
used as a static adapter to processObjectRemoved
| virtual void vrfLua::DtLuaScriptManager::processObjectRemoved | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
remove it from the World
| virtual DtLuaScriptController* vrfLua::DtLuaScriptManager::createLuaComponent | ( | DtVrfObject * | vrfObject | ) | [protected, virtual] |
Add the Lua component to the passed entity.
| virtual void vrfLua::DtLuaScriptManager::sendScriptList | ( | ) | [protected, virtual] |
Sends the current script list to the GUI.
| virtual std::vector<DtString> vrfLua::DtLuaScriptManager::scriptNamesOnDisk | ( | ) | [protected, virtual] |
Returns the names of all the scripts available on the disk.
| virtual void vrfLua::DtLuaScriptManager::sendScriptText | ( | const DtString & | scriptName | ) | [protected, virtual] |
Sends the text of the specified script onto the network.
| virtual void vrfLua::DtLuaScriptManager::saveScriptText | ( | const DtString & | scriptName, |
| const std::list< DtString > & | scriptLines | ||
| ) | [protected, virtual] |
Saves the script to the disk.
It will be saved with the name specified, and the text lines provided. Any preexisting script of this name will be overwritten.
| virtual bool vrfLua::DtLuaScriptManager::deleteScript | ( | const DtString & | scriptName | ) | [protected, virtual] |
Deletes the named script from the disk.
struct luaL_reg vrfLua::DtLuaScriptManager::myVrfLib[] [static, protected] |
struct luaL_reg vrfLua::DtLuaScriptManager::myVrfObjLib[] [static, protected] |
struct luaL_reg vrfLua::DtLuaScriptManager::myThisVrfObjLib[] [static, protected] |
DtCgf* vrfLua::DtLuaScriptManager::myCgf [protected] |
pointer to main VRF application