Navigation
API > API/Runtime > API/Runtime/UniversalObjectLocator
Inheritance Hierarchy
- FUniversalObjectLocatorFragment
- TUniversalObjectLocatorFragment
References
| Module | UniversalObjectLocator |
| Header | /Engine/Source/Runtime/UniversalObjectLocator/Public/UniversalObjectLocatorFragment.h |
| Include | #include "UniversalObjectLocatorFragment.h" |
Syntax
USTRUCT (BlueprintType )
struct FUniversalObjectLocatorFragment
Remarks
Universal Object Locator (UOL) Fragments provide an extensible mechanism for referencing permanent, transient or dynamically created objects relative to an external context. UOLs comprise zero or more nested fragments.
Creation and resolution of a fragment requires a context to be provided; normally this will be the object on which the UOL exists as a property.
The way in which the object is referenced is defined by globally registered 'FragmentTypes' (See IUniversalObjectLocatorModule::RegisterFragmentType). Each FragmentType can be thought of as somewhat equivalent to a www URI fragment type, though the 'path' is not necessarily just a string, but includes support for the full set of Engine Property types.
The type is implemented as a type-erased payload block, a fragment type handle and some internal flags. Payloads will be allocated using the inline memory if alignment and size constraints allow, but will fall back to a heap allocation if necessary. Allocation should be avoided by keeping payload types small.
Aligned to 8 bytes, 32 (runtime) or 64 (editor) bytes big.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor: initializes to an empty fragment with no fragment type | |||
FUniversalObjectLocatorFragment
(
const UE::UniversalObjectLocator::FFragmentType& InFragmentType |
Construct a new fragment with a specific fragment type and default-constructed payload. | ||
FUniversalObjectLocatorFragment
(
const FUniversalObjectLocatorFragment& RHS |
Copy construction/assignment | ||
| Move construction/assignment | |||
FUniversalObjectLocatorFragment
(
UE::UniversalObjectLocator::TFragmentTypeHandle< T > InHandle, |
Construct a new fragment with a specific fragment type and data. | ||
FUniversalObjectLocatorFragment
(
const UObject* InObject, |
Construct this fragment by binding it to an object within a given context. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor - destructs the payload, and frees any heap allocation as necessary |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddStructReferencedObjects
(
FReferenceCollector& Collector |
||
| void | CheckPayloadType
(
UScriptStruct* TypeToCompare |
Runtime type-checking against specific struct types. | |
| void | Destroy the payload (if valid) by calling its destructor and freeing the memory (if necessary) | ||
| bool | ExportTextItem
(
FString& ValueStr, |
||
| UScriptStruct * | Retrieve this fragment's fragment struct type | ||
| const UE::UniversalObjectLocator::FFragmentType * | Retrieve this fragment's fragment type | ||
| UE::UniversalObjectLocator::FFragmentTypeHandle | Retrieve this fragment's fragment type handle | ||
| const void * | GetPayload () |
Retrieve this fragment's payload data | |
| void * | GetPayload () |
Retrieve this fragment's payload data | |
| const T * | GetPayloadAs
(
UE::UniversalObjectLocator::TFragmentTypeHandle< T > InType |
Try and retrieve this fragment's payload as a specific type using its fragment type handle | |
| T * | GetPayloadAs
(
UE::UniversalObjectLocator::TFragmentTypeHandle< T > InType |
Try and retrieve this fragment's payload as a specific type using its fragment type handle | |
| void | GetPreloadDependencies
(
TArray< UObject* >& OutDeps |
||
| bool | ImportTextItem
(
const TCHAR*& Buffer, |
||
| void | InitializePayload
(
const UScriptStruct* StructType |
Default-initialize the fragment payload using the specified type | |
| bool | IsEmpty () |
Check whether this reference is empty. | |
| void | Reset this fragment to point to a new object from the specified context | ||
| void | Reset
(
const UObject* InObject, |
Reset this fragment to point to a new object from the specified context using a filtered set of fragment types | |
| void | Reset () |
Reset this fragment back to its default-constructed, empty state | |
| UE::UniversalObjectLocator::FResolveResult | Resolve
(
const UE::UniversalObjectLocator::FResolveParams& Params |
Attempt to resolve this fragment by invoking the payload's 'Resolve' function | |
| bool | |||
| bool | SerializeFromMismatchedTag
(
const FPropertyTag& Tag, |
||
| void | ToString
(
FStringBuilderBase& OutString |
Convert this fragment to a string of the form fragment-id[=fragment-payload] | |
| bool | TryGetPayloadAs
(
UE::UniversalObjectLocator::TFragmentTypeHandle< T > InType, |
Try and retrieve this fragment's payload as a specific type using its fragment type handle | |
| bool | TryGetPayloadAs
(
UE::UniversalObjectLocator::TFragmentTypeHandle< T > InType, |
Try and retrieve this fragment's payload as a specific type using its fragment type handle | |
| FParseStringResult | TryParseFragmentPayload
(
FStringView InString, |
Attempt to deserialize this fragment's payload from a string, based on its currently assigned type The state of this instance will not be changed if this function returns false. | |
| FParseStringResult | TryParseFragmentType
(
FStringView InString, |
Attempt to default initialize this fragment using a string that defines the type The state of this instance will not be changed if this function returns false. | |
| FParseStringResult | TryParseString
(
FStringView InString, |
Attempt to initialize this fragment from a string of the form fragment-type-id[=payload] The state of this instance will not be changed if this function returns false. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FUniversalObjectLocatorFragment & | operator=
(
FUniversalObjectLocatorFragment&& RHS |
||
| FUniversalObjectLocatorFragment & | operator=
(
const FUniversalObjectLocatorFragment& RHS |
Typedefs
| Name | Description |
|---|---|
| FParseStringParams | |
| FParseStringResult |
Constants
| Name | Description |
|---|---|
| Size | Make our inline data buffer larger in-editor to support editor-only data without allocation |
| ValidFragmentDelimiters | Valid fragment delimiters are those that are allowable by RFC3986 for the query part (unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?") excluding '&' which we use to separate fragments within a path. |
| ValidFragmentPayloadCharacters | |
| ValidFragmentTypeCharacters |