Wraps a nkScripts::Environment and offer functions for use in scripting. More...
Static Public Member Functions | |
static void | updateEnvironment (nkScripts::Environment *env) |
Wraps a nkScripts::Environment and offer functions for use in scripting.
The environment is particular as its offers static functions not exposed in the wrapper :
-> Wrapper for nkScripts::Environmnent::serialize().
-> Wrapper for nkScripts::Environment::serialize(), with a forward in the ownership of any C++ defined user data.
-> Wrapper for nkScripts::Environment::deserialize().
Note that ownership of data can be a delicate subject when going from one Environment to another, for instance for threading.
This is why ownership forwarding can be done, as it will prevent garbage collection from happening in the Environment that allocated the user data in the first place. It is important to know when the scripting environment owns the memory allocated. See nkScripts::UserType to have more information on that matter.
|
static |
Updates a given environment and set it up to use all functions wrapped by this wrapper.
env | The environment to set up. |