Loads and replaces native script libraries with ABI validation.
More...
#include <ScriptModule.h>
Loads and replaces native script libraries with ABI validation.
The module loads a shadow copy, validates its ABI and registers definitions against the engine. Definitions and instances retain a module lease so native code stays mapped while it is still referenced.
- Usage
- Build GameScripts.dll against the matching engine toolchain and headers. Load reports diagnostics through its error argument. A failed reload must not discard the previous working implementation.
Definition at line 48 of file ScriptModule.h.
◆ ScriptModule() [1/2]
| FINALITY::ScriptModule::ScriptModule |
( |
| ) |
|
◆ ~ScriptModule()
| FINALITY::ScriptModule::~ScriptModule |
( |
| ) |
|
◆ ScriptModule() [2/2]
| FINALITY::ScriptModule::ScriptModule |
( |
const ScriptModule & | | ) |
|
|
delete |
◆ operator=()
◆ Load()
| bool FINALITY::ScriptModule::Load |
( |
const std::filesystem::path & | library, |
|
|
const std::filesystem::path & | shadowDirectory, |
|
|
Scene * | scene, |
|
|
std::string & | error ) |
Validates and loads a compiled native script module.
- Parameters
-
| library | Compiled module built against the matching engine ABI. |
| shadowDirectory | Writable directory for unique loaded library copies. |
| scene | Scene whose attached instances participate in replacement; may be null. |
| error | Receives a diagnostic when loading or registration fails. |
- Returns
- True when the new module is accepted. Definitions and instances retain module leases so replacement does not unload code while surviving objects still need it. Failed loading preserves the prior module.
◆ Unload()
| void FINALITY::ScriptModule::Unload |
( |
| ) |
|
◆ IsLoaded()
| bool FINALITY::ScriptModule::IsLoaded |
( |
| ) |
const |
◆ GetGeneration()
| uint64_t FINALITY::ScriptModule::GetGeneration |
( |
| ) |
const |
The documentation for this class was generated from the following file: