Drives the scripting sub engine. More...
Public Member Functions | |
ScriptsEngine (System *system=nullptr) noexcept | |
~ScriptsEngine () | |
nkScripts::Environment * | getEnvironment () const |
bool | initialize () |
void | shutdown () |
Static Public Member Functions | |
static void | setupScriptsEnvironment (nkScripts::Environment *environment, LogManager *targetLogManager) |
Drives the scripting sub engine.
The scripting engine wraps a big part of the C++ API, enabling dynamic programming in a live environment.
|
noexcept |
Constructor.
system | The system the resource should live in. This will allow to select the LogManager to log to. If left to nullptr, no logging will happen in wrapped functions. |
nkAstraeus::ScriptsEngine::~ScriptsEngine | ( | ) |
Destructor.
nkScripts::Environment* nkAstraeus::ScriptsEngine::getEnvironment | ( | ) | const |
bool nkAstraeus::ScriptsEngine::initialize | ( | ) |
Initializes the scripting sub component. Under the hood, this will create a nkScripts::Environment and populate it with all functions necessary to use the API.
void nkAstraeus::ScriptsEngine::shutdown | ( | ) |
Shuts down the sub component. This will free the scriptin environment and free its memory.
|
static |
Setups a given scripting environment with the nkEngine API that has been wrapped so far. For more information, please check the wrapping structures such as LogWrapper.
environment | The environment to augment with the engine's API. |
targetLogManager | The target log manager, should logging happen within the populated methods. |