#include <LuaScriptQueue.hpp>
Collaboration diagram for BARE2D::LuaScriptQueue:Public Member Functions | |
| unsigned int | addLuaScript (LuaScript &script) |
| Adds a script to the queue to be run. More... | |
| unsigned int | addLuaScript (std::string script) |
| Adds a script to the queue to be run by its source code. More... | |
| std::map< unsigned int, LuaScript * > & | getQueue () |
| Returns the queue of scripts to activate. More... | |
| void | clearQueue () |
| Clears the stored script queue - for regular use by tbe Script Engine. Deallocates memory that was in use in the m_scripts map. More... | |
Static Public Member Functions | |
| static LuaScriptQueue * | getInstance () |
| Returns a pointer to the singleton object - creates the object if one doesn't already exist. More... | |
| static void | destroyInstance () |
| Destroys the singleton. More... | |
Private Member Functions | |
| LuaScriptQueue () | |
| ~LuaScriptQueue () | |
Private Attributes | |
| std::map< unsigned int, LuaScript * > | m_scripts |
| unsigned int | m_lastUUID = -1 |
Static Private Attributes | |
| static LuaScriptQueue * | m_instance = nullptr |
Definition at line 15 of file LuaScriptQueue.hpp.
|
private |
Definition at line 9 of file LuaScriptQueue.cpp.
Referenced by getInstance().
Here is the caller graph for this function:
|
private |
Definition at line 14 of file LuaScriptQueue.cpp.
| unsigned int BARE2D::LuaScriptQueue::addLuaScript | ( | LuaScript & | script | ) |
Adds a script to the queue to be run.
| script | A reference to the LuaScript to add to the queue. |
Definition at line 31 of file LuaScriptQueue.cpp.
References m_lastUUID, and m_scripts.
Referenced by addLuaScript().
Here is the caller graph for this function:| unsigned int BARE2D::LuaScriptQueue::addLuaScript | ( | std::string | script | ) |
Adds a script to the queue to be run by its source code.
| script | The code to run. |
Definition at line 42 of file LuaScriptQueue.cpp.
References addLuaScript(), BARE2D::LuaScript::inited, and BARE2D::LuaScript::m_script.
Here is the call graph for this function:| void BARE2D::LuaScriptQueue::clearQueue | ( | ) |
Clears the stored script queue - for regular use by tbe Script Engine. Deallocates memory that was in use in the m_scripts map.
Definition at line 56 of file LuaScriptQueue.cpp.
References m_scripts.
Referenced by BARE2D::LuaScriptEngine::update().
Here is the caller graph for this function:
|
static |
|
static |
Returns a pointer to the singleton object - creates the object if one doesn't already exist.
Definition at line 19 of file LuaScriptQueue.cpp.
References LuaScriptQueue(), and m_instance.
Referenced by BARE2D::LuaScriptEngine::update().
Here is the call graph for this function:
Here is the caller graph for this function:| std::map< unsigned int, LuaScript * > & BARE2D::LuaScriptQueue::getQueue | ( | ) |
Returns the queue of scripts to activate.
Definition at line 51 of file LuaScriptQueue.cpp.
References m_scripts.
|
staticprivate |
Definition at line 58 of file LuaScriptQueue.hpp.
Referenced by destroyInstance(), and getInstance().
|
private |
Definition at line 64 of file LuaScriptQueue.hpp.
Referenced by addLuaScript().
|
private |
Definition at line 61 of file LuaScriptQueue.hpp.
Referenced by addLuaScript(), clearQueue(), and getQueue().