UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
Mod::API::FNativeAccess Struct Reference

Host-only token access for generated fixed-signature C ABI bridges. More...

#include <ModAPINative.h>

Static Public Member Functions

static TModResult< FNativeContext > Open (FRegistry &Registry, const FCaller &Caller, bool bExposeScope=true)
 Issues opaque tokens for a host-approved caller.
static TModResult< void > Close (uint64 Context)
 Releases a native context and every object token it owns.
static TModResult< FObjectBinding > Resolve (uint64 Context, uint64 Target, FName TypeId, const TCHAR *Signature)
 Resolves a scope/provider or object token for a generated call.
static TModResult< FObjectBinding > ResolveObject (uint64 Context, uint64 Target, FName TypeId, const TCHAR *Signature)
 Resolves an object token on the game thread.
static TModResult< uint64 > Publish (uint64 Context, FObjectBinding Binding)
 Publishes an authorized object as a context-owned token.
static TModResult< void > Release (uint64 Context, uint64 Object)
 Releases an object token without affecting the actual UObject.
template<class T>
static void RegisterHostQuery (const char *Module, const char *Symbol, T Query)
 Makes a generated host API query address available to native Mods.
static void * FindHostQuery (const TCHAR *Module, const TCHAR *Symbol)
 Looks up an exact registered query on the game thread.
static void ForgetHostQueries (const TCHAR *Module)
 Withdraws query addresses when the owning host registration goes away.
static TModResult< FObjectBinding > ResolveAnyObject (uint64 Context, uint64 Object)
 Looks up a context-owned object for a native callback adapter.
static bool OwnsContext (uint64 Context, const FCaller &Caller)
 Checks whether the given context was issued to this host caller.
static bool ReadSDKObjectPath (uint64 Context, uint64 Object, bool bWritable, FString &OutPath)
 Recovers the path of a live SDK reference owned by the calling context.
static bool MatchesObject (uint64 Context, uint64 Object, const UObject &Source)
 Checks whether a live binding identifies this exact source object.
static TModResult< const UObject * > ReadPayloadObject (const FObjectBinding &Binding)
 Reads an object while its callback lease is valid.

Detailed Description

Host-only token access for generated fixed-signature C ABI bridges.

Member Function Documentation

◆ Close()

TModResult< void > Mod::API::FNativeAccess::Close ( uint64 Context)
static

Releases a native context and every object token it owns.

Parameters
ContextA token issued by Open.
Returns
Success or a thread/lifetime failure.

◆ Open()

TModResult< FNativeContext > Mod::API::FNativeAccess::Open ( FRegistry & Registry,
const FCaller & Caller,
bool bExposeScope = true )
static

Issues opaque tokens for a host-approved caller.

Parameters
RegistryThe caller's registry.
CallerThe host-issued caller and permission grant.
bExposeScopeWhether scope-provider access is available.
Returns
Tokens or a thread/lifetime failure.

◆ Publish()

TModResult< uint64 > Mod::API::FNativeAccess::Publish ( uint64 Context,
FObjectBinding Binding )
static

Publishes an authorized object as a context-owned token.

Parameters
ContextThe identity receiving the result.
BindingThe generated and validated object projection.
Returns
A nonzero token or a lifetime/scope failure.

◆ Release()

TModResult< void > Mod::API::FNativeAccess::Release ( uint64 Context,
uint64 Object )
static

Releases an object token without affecting the actual UObject.

Parameters
ContextThe identity owning the token.
ObjectThe object token to release.
Returns
Success or a thread/lifetime failure.

◆ Resolve()

TModResult< FObjectBinding > Mod::API::FNativeAccess::Resolve ( uint64 Context,
uint64 Target,
FName TypeId,
const TCHAR * Signature )
static

Resolves a scope/provider or object token for a generated call.

Parameters
ContextThe calling identity.
TargetThe caller's scope or an object issued to this context.
TypeIdThe exact generated source type.
SignatureThe expected generated calling-table signature.
Returns
A checked binding without exposing a raw object address.

◆ ResolveObject()

TModResult< FObjectBinding > Mod::API::FNativeAccess::ResolveObject ( uint64 Context,
uint64 Target,
FName TypeId,
const TCHAR * Signature )
static

Resolves an object token on the game thread.

Parameters
ContextThe calling identity.
TargetAn object token issued to this context.
TypeIdThe exact generated source type.
SignatureThe expected generated calling-table signature.
Returns
The checked object binding or an authorization error.

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