Navigation
API > API/Plugins > API/Plugins/UAF
Global registry of animation data Holds ref counted data that gets released when the last DataHandle of that element goes out of scope Calling public functions from multiple threads is expected. Data races are guarded by a FRWLock. TODO : Memory management will have to be implemented to avoid fragmentation and performance reasons
| Name | FDataRegistry |
| Type | class |
| Header File | /Engine/Plugins/Experimental/UAF/UAF/Source/UAF/Public/DataRegistry.h |
| Include Path | #include "DataRegistry.h" |
Syntax
class FDataRegistry
Structs
| Name | Remarks |
|---|---|
| FDataTypeDef | Structure holding each registered type information |
| FReferencePoseData |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DestroyFnSignature | void(*) | DataRegistry.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DEFAULT_BLOCK_SIZE | int32 | DataRegistry.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllocatedBlocks | TSet< Private::FAllocatedBlock * > | DataRegistry.h | ||
| AllocatedBlocksLock | FRWLock | Lock for allocated blocks. | DataRegistry.h | |
| DataTypeDefs | TMap< FAnimNextParamType, FDataTypeDef > | Map holding registered types. | DataRegistry.h | |
| DataTypeDefsLock | FRWLock | Lock for registered types map. | DataRegistry.h | |
| GCCleanupTickerHandle | FTSTicker::FDelegateHandle | A handle to our ticker when GC runs and we need to clean things up. | DataRegistry.h | |
| GCKeysProcessedIndex | int32 | The current index of GC keys to process. | DataRegistry.h | |
| GCKeysToCleanup | TArray< TObjectKey< USkeletalMeshComponent > > | Array of keys to clean up post-GC. | DataRegistry.h | |
| HandleCounter | volatile int32 | DataRegistry.h | ||
| SkeletalMeshReferencePoses | TMap< TObjectKey< USkeletalMeshComponent >, FReferencePoseData > | Map holding reference poses for SkeletalMeshes. | DataRegistry.h | |
| SkeletalMeshReferencePosesLock | FRWLock | DataRegistry.h | ||
| StoredData | TMap< FName, FDataHandle > | Map holding named data. | DataRegistry.h | |
| StoredDataLock | FRWLock | DataRegistry.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDataHandle AllocateData
(
const int32 NumElements, |
Allocates memory for a type, initialized with the default constructor (with optional passed arguments) Returns a refcounted animation data handle Allocated memory will be released once the refcount reaches 0 | DataRegistry.h | |
FDataHandle GetOrGenerateReferencePose
(
USkeletalMeshComponent* SkeletalMeshComponent |
Returns a ref counted handle to the refence pose of the given skeletal mesh component. | DataRegistry.h | |
FDataHandle GetRegisteredData
(
const FName& Id |
Obtains the data hanle for the passed Id, if it exists. | DataRegistry.h | |
FDataHandle PreAllocateMemory
(
const int32 NumElements |
Allocates uninitialized memory for a type (leaving the initialization to the caller) Returns a refcounted animation data handle Allocated memory will be released once the refcount reaches 0 | DataRegistry.h | |
void RegisterData
(
const FName& Id, |
Registers an anim data handle with arbitrary data using an FName Note that AnimDataHandles are refcounted, so this makes them permanent until unregistered | DataRegistry.h | |
void RegisterDataType
(
int32 AllocationBlockSize |
Registers a type and sets the desired preallocation block size If a type is allocated without registering, a default block size of 32 will be used | DataRegistry.h | |
FDataHandle RegisterReferencePose
(
USkeletalMeshComponent* SkeletalMeshComponent |
Generates and registers a reference pose for the SkeletalMesh asset of the SkeletalMeshComponent and modifies it with the additional required bones or the visibility state of the bones of the SkeletalMeshComponent | DataRegistry.h | |
void RemoveReferencePose
(
USkeletalMeshComponent* SkeletalMeshComponent |
Removes a previously registered reference pose for the given SkeletalMeshComponent. | DataRegistry.h | |
void UnregisterData
(
const FName& Id |
Unregisters a previously registered anim data handle. | DataRegistry.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void Destroy() |
Shutdown the global registry. | DataRegistry.h | |
static bool GCCleanupTicker
(
float DeltaTime |
DataRegistry.h | ||
static FDataRegistry * Get() |
Access the global registry. | DataRegistry.h | |
static void HandlePostGarbageCollect() |
DataRegistry.h | ||
static void Init() |
Initialize the global registry. | DataRegistry.h | |
static void OnPreExit() |
Called before engine shutdown to clear internal state while UObjects are still valid. | DataRegistry.h |