Skip to content

Engine → Scripting → script_host.h

script_host

Syntax

class CONJURE_API script_host

Derived Classes

Classes that use this as a base

Constructors

AccessSignatureDescription
publicscript_host();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
publicvirtual ~script_host();

Functions

Public

backend

[[nodiscard]] virtual script_backend backend() const noexcept = 0;

initialise

[[nodiscard]] virtual core::result<void> initialise(
    const script_host_config &config,
    conjure_native_api &nativeApi) = 0;

Starts (or attaches to) the runtime and performs the ABI handshake over nativeApi, which the caller must have filled and which must outlive the host. Main thread only. Failure leaves the host DISABLED.

managed_api

[[nodiscard]] virtual const conjure_managed_api &managed_api() const noexcept = 0;

The table the managed side filled during the handshake; all null before READY.

shutdown

virtual void shutdown() = 0;

Stops managed execution for this host (instances destroyed, game assembly unloaded). The CLR stays resident until process exit.

status

[[nodiscard]] virtual script_host_status status() const noexcept = 0;