UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
Mod::API::FRegistry Class Reference

Owns a session's generated definitions, providers, scopes, and callers. More...

#include <ModAPIRegistry.h>

Public Member Functions

 FRegistry ()
 Creates a registry on the game thread.
 ~FRegistry ()
 Revokes all derived bindings on the game thread.
TModResult< FRegistration > RegisterType (FTypeDescriptor Descriptor)
 Registers one generated type and its concrete calling table.
TModResult< FScope > OpenWorldScope (UWorld *World)
 Opens a scope for a live world.
TModResult< FScope > OpenPlayerScope (ULocalPlayer *Player, const FScope &WorldScope)
 Opens a local player scope in a particular world.
TModResult< void > CloseScope (const FScope &Scope)
 Closes a scope and invalidates its bindings.
TModResult< FCaller > CreateCaller (const FScope &Scope, TSet< FName > Permissions)
 Issues a caller with explicit host-granted permissions.
TModResult< void > RevokeCaller (const FCaller &Caller)
 Revokes a caller and all views issued to it.
TModResult< FRegistration > RegisterProvider (FName TypeId, const FScope &Scope, UObject *Instance)
 Registers an explicit service instance in a scope.
TModResult< FObjectBinding > BindProvider (FName TypeId, const TCHAR *Signature, const FCaller &Caller)
 Binds a registered provider once for a caller.
TModResult< FObjectBinding > BindWorldObject (const FCaller &Caller, UObject &Object, FName TypeId, const TCHAR *Signature, bool bReadOnly, bool bWorldOwned=false)
 Projects a host-approved object into the caller's World view.
UClass * FindWorldType (FName TypeId, FString &OutSignature) const
 Returns the registered World projection class to host code.
FSoftClassPath FindBlueprintWorldType (FName TypeId, FString &OutSignature) const
 Reads an exported Blueprint World type without loading its class.
const FString * FindLocalPlayerSignature (FName TypeId) const
 Finds an explicitly exported local-player provider signature.

Detailed Description

Owns a session's generated definitions, providers, scopes, and callers.

Member Function Documentation

◆ BindProvider()

TModResult< FObjectBinding > Mod::API::FRegistry::BindProvider ( FName TypeId,
const TCHAR * Signature,
const FCaller & Caller )

Binds a registered provider once for a caller.

Parameters
TypeIdThe expected source type.
SignatureThe compiled generated table signature.
CallerThe host-issued caller.
Returns
An opaque binding, or a compatibility/provider error.

◆ CloseScope()

TModResult< void > Mod::API::FRegistry::CloseScope ( const FScope & Scope)

Closes a scope and invalidates its bindings.

Parameters
ScopeA scope issued by this registry.
Returns
Success or a caller/thread error.

◆ CreateCaller()

TModResult< FCaller > Mod::API::FRegistry::CreateCaller ( const FScope & Scope,
TSet< FName > Permissions )

Issues a caller with explicit host-granted permissions.

Parameters
ScopeThe caller's world or player scope.
PermissionsThe exact permission identifiers granted by the host.
Returns
A caller, or a scope error.

◆ OpenPlayerScope()

TModResult< FScope > Mod::API::FRegistry::OpenPlayerScope ( ULocalPlayer * Player,
const FScope & WorldScope )

Opens a local player scope in a particular world.

Parameters
PlayerThe explicit local player.
WorldScopeThe parent world scope.
Returns
A scope, or a scope error.

◆ OpenWorldScope()

TModResult< FScope > Mod::API::FRegistry::OpenWorldScope ( UWorld * World)

Opens a scope for a live world.

Parameters
WorldThe world owned by the host.
Returns
A scope, or an argument error.

◆ RegisterProvider()

TModResult< FRegistration > Mod::API::FRegistry::RegisterProvider ( FName TypeId,
const FScope & Scope,
UObject * Instance )

Registers an explicit service instance in a scope.

Parameters
TypeIdThe generated source type.
ScopeThe provider's scope.
InstanceA non-owned instance managed by the game.
Returns
A registration token, or a compatibility/scope error.

◆ RegisterType()

TModResult< FRegistration > Mod::API::FRegistry::RegisterType ( FTypeDescriptor Descriptor)

Registers one generated type and its concrete calling table.

Parameters
DescriptorThe immutable module-owned definition.
Returns
A revocation token, or a registration error.

◆ RevokeCaller()

TModResult< void > Mod::API::FRegistry::RevokeCaller ( const FCaller & Caller)

Revokes a caller and all views issued to it.

Parameters
CallerA caller issued by this registry.
Returns
Success or a caller/thread error.

The documentation for this class was generated from the following file: