#include <LuaContextManager.hpp>
Collaboration diagram for BARE2D::LuaContextManager:Public Member Functions | |
| void | update () |
| Updates all of the context wrappers, pausing, removing (if finished), or resuming them as is correct. More... | |
| void | addContext (unsigned int id, LuaScriptContextWrapper *context) |
| Adds a context wrapper to the map. More... | |
| LuaScriptContextWrapper * | getContext (unsigned int id) |
| Gets a context wrapper from the map. More... | |
Static Public Member Functions | |
| static LuaContextManager * | getInstance () |
| static void | destroyInstance () |
Private Member Functions | |
| LuaContextManager () | |
| ~LuaContextManager () | |
| void | removeContext (unsigned int id) |
| Removes a context wrapper from the map. More... | |
Private Attributes | |
| std::map< unsigned int, LuaScriptContextWrapper * > | m_contexts |
Static Private Attributes | |
| static LuaContextManager * | m_instance = nullptr |
Definition at line 14 of file LuaContextManager.hpp.
|
private |
Definition at line 11 of file LuaContextManager.cpp.
Referenced by getInstance().
Here is the caller graph for this function:
|
private |
Definition at line 16 of file LuaContextManager.cpp.
| void BARE2D::LuaContextManager::addContext | ( | unsigned int | id, |
| LuaScriptContextWrapper * | context | ||
| ) |
Adds a context wrapper to the map.
| id | The ID that the ScriptQueue gave the script all those cycles ago |
| context | The context to insert in the map. |
Definition at line 54 of file LuaContextManager.cpp.
References m_contexts.
Referenced by BARE2D::LuaScriptEngine::update().
Here is the caller graph for this function:
|
static |
Definition at line 29 of file LuaContextManager.cpp.
References m_instance.
| LuaScriptContextWrapper * BARE2D::LuaContextManager::getContext | ( | unsigned int | id | ) |
Gets a context wrapper from the map.
| id | The ID of the context, given by the LuaScriptQueue::addScript() call. |
Definition at line 80 of file LuaContextManager.cpp.
References m_contexts.
|
static |
Definition at line 21 of file LuaContextManager.cpp.
References LuaContextManager(), and m_instance.
Referenced by BARE2D::LuaScriptEngine::update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Removes a context wrapper from the map.
| id | The ID of the context to remove from the map. |
Definition at line 60 of file LuaContextManager.cpp.
References BARE2D::LUA_FAILURE, m_contexts, and BARE2D::throwError().
Here is the call graph for this function:| void BARE2D::LuaContextManager::update | ( | ) |
Updates all of the context wrappers, pausing, removing (if finished), or resuming them as is correct.
Definition at line 33 of file LuaContextManager.cpp.
References m_contexts.
Referenced by BARE2D::LuaScriptEngine::update().
Here is the caller graph for this function:
|
private |
Definition at line 52 of file LuaContextManager.hpp.
Referenced by addContext(), getContext(), removeContext(), and update().
|
staticprivate |
Definition at line 43 of file LuaContextManager.hpp.
Referenced by destroyInstance(), and getInstance().