5#include "Containers/Array.h"
6#include "Containers/ArrayView.h"
8#include "StructUtils/InstancedStruct.h"
9#include "UObject/WeakObjectPtrTemplates.h"
10#include "UObject/StrongObjectPtr.h"
14namespace Mod::Extension
51 const UObject* GetObject()
const
55 bool IsNullObject()
const
57 return Object.IsExplicitlyNull();
59 void SetView(API::FObjectBinding Binding)
61 View = MoveTemp(Binding);
65 FInstancedStruct Struct;
66 TWeakObjectPtr<const UObject> Object;
67 TOptional<API::FObjectBinding> View;
68 TArray<uint8> NativeCall;
97 MODAPI_API
bool Matches(
const FPayload& Value,
const UWorld* World)
const;
104 FString BlueprintLayout;
105 TStrongObjectPtr<UScriptStruct> StructType;
106 TStrongObjectPtr<UClass> ObjectType;
@ BindingExpired
A scope, caller, registry, or registration has been revoked.
Definition ModAPIResult.h:17
MODAPI_API FString DescribePayloadStruct(const UScriptStruct &Struct)
Describes the supported reflected fields of a host value struct.
static FPayload FromNativeCall(TArray< uint8 > Value)
Owns the packed inputs and result of a C++ Hook.
FPayload()=default
Creates an empty payload.
static FPayload FromStruct(const UScriptStruct &Type, const void *Value)
Copies a value of the supplied struct type into owned storage.
const FInstancedStruct & GetStruct() const
Reads a copied struct while this payload remains alive.
Definition ModExtensionPayload.h:39
TModResult< API::FObjectBinding > GetObjectView() const
Projects an object to a revocable, read-only binding for this callback.
Definition ModExtensionPayload.h:44
static FPayload FromStruct(const T &Value)
Copies a reflected native struct into owned storage.
Definition ModExtensionPayload.h:25
static FPayload FromObject(const UObject *Value)
Captures an object weakly for the duration of the World operation.
TConstArrayView< uint8 > GetNativeCall() const
Reads the bytes of a C++ Hook value.
Definition ModExtensionPayload.h:34
A synchronous API result containing either a value or a stable error.
Definition ModAPIResult.h:47
static TModResult Failure(Mod::API::EError InError)
Constructs a failed result.
Definition ModAPIResult.h:64
static TModResult Success(T InValue)
Constructs a successful result.
Definition ModAPIResult.h:53
The reflected identity and generated validation for a payload projection.
Definition ModExtensionPayload.h:73
FString Signature
Calling-table signature of that view.
Definition ModExtensionPayload.h:85
MODAPI_API bool Prepare()
Resolves and validates the generated type before dispatch begins.
FName BlueprintType
Generated SDK struct name for a value payload.
Definition ModExtensionPayload.h:81
MODAPI_API bool MatchesBlueprint(const UScriptStruct &Type) const
Checks the generated SDK value fields against the host contract.
FString Layout
Generated member schema for Blueprint and C ABI value copies.
Definition ModExtensionPayload.h:79
int32 NativeCallSize
Packed arguments and result size for a C++ Hook.
Definition ModExtensionPayload.h:87
FSoftClassPath Object
Exact UObject class path, when used by the contract.
Definition ModExtensionPayload.h:77
FSoftObjectPath Struct
Exact script struct path, when used by the contract.
Definition ModExtensionPayload.h:75
FName TypeId
Generated read-only view identity for a UObject payload.
Definition ModExtensionPayload.h:83