UnrealModFramework
Mod framework API
Toggle main menu visibility
Loading...
Searching...
No Matches
ModAPIObject.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Nelaric Contributors
3
#pragma once
4
5
#include "
ModAPIResult.h
"
6
7
namespace
Mod::API
8
{
9
struct
FBindingState;
10
struct
FHostAccess
;
11
struct
FNativeAccess
;
12
struct
FViewFactory
;
14
template
<
class
T>
struct
TBindingTraits
;
15
17
class
MODAPI_API
FObjectBinding
18
{
19
public
:
25
TModResult<const void*>
ResolveCalls
(FName TypeId,
const
TCHAR* Signature)
const
;
27
TModResult<FObjectBinding>
Borrow
(TWeakPtr<const uint8> Lifetime)
const
;
28
29
private
:
30
friend
class
FRegistry;
31
friend
struct
FHostAccess;
32
friend
struct
FNativeAccess;
33
friend
struct
FViewFactory;
34
TSharedPtr<FBindingState> State;
35
};
36
38
struct
FViewFactory
39
{
45
template
<
class
T>
static
auto
Make
(
FObjectBinding
Binding);
46
};
47
}
// namespace Mod::API
48
50
template
<
class
T>
class
FModRuntimeObject
;
51
52
template
<
class
T>
auto
Mod::API::FViewFactory::Make
(
FObjectBinding
Binding)
53
{
54
return
FModRuntimeObject<T>
(MoveTemp(Binding));
55
}
ModAPIResult.h
FModRuntimeObject
The primary template has no API; MHT supplies closed specializations.
Definition
ModAPIObject.h:50
Mod::API::FObjectBinding
An opaque, non-owning object binding with a cached typed calling table.
Definition
ModAPIObject.h:18
Mod::API::FObjectBinding::ResolveCalls
TModResult< const void * > ResolveCalls(FName TypeId, const TCHAR *Signature) const
Validates and reads the cached calling table on the game thread.
Mod::API::FObjectBinding::Borrow
TModResult< FObjectBinding > Borrow(TWeakPtr< const uint8 > Lifetime) const
Gets a read-only binding with a callback-owned lifetime.
TModResult
A synchronous API result containing either a value or a stable error.
Definition
ModAPIResult.h:47
Mod::API::FHostAccess
Host-only operations used by concrete generated calling bridges.
Definition
ModAPIHost.h:66
Mod::API::FNativeAccess
Host-only token access for generated fixed-signature C ABI bridges.
Definition
ModAPINative.h:20
Mod::API::FViewFactory
Constructs the generated specialization without exposing an object pointer.
Definition
ModAPIObject.h:39
Mod::API::FViewFactory::Make
static auto Make(FObjectBinding Binding)
Constructs a typed view from an already authorized binding.
Definition
ModAPIObject.h:52
Mod::API::TBindingTraits
Specialized by MHT with stable type and calling-table identities.
Definition
ModAPIObject.h:14
ModRuntime
Source
Runtime
ModAPI
Public
ModAPIObject.h
Generated by
1.18.0