UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AnimationDataSource.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Map.h"
6#include "CoreMinimal.h"
7#include "Templates/Casts.h"
8#include "UObject/Interface.h"
9#include "UObject/NameTypes.h"
10#include "UObject/Object.h"
14
15#include "AnimationDataSource.generated.h"
16
17class UClass;
18
19UCLASS(MinimalAPI)
21{
23
24public:
25
34 ANIMATIONCORE_API bool RegisterDataSource(const FName& InName, UObject* InDataSource);
35
43 ANIMATIONCORE_API bool UnregisterDataSource(const FName& InName);
44
51 ANIMATIONCORE_API bool ContainsSource(const FName& InName) const;
52
60 ANIMATIONCORE_API UObject* RequestSource(const FName& InName, UClass* InExpectedClass) const;
61
68 template<class T>
69 T* RequestSource(const FName& InName) const
70 {
71 UObject* DataSource = RequestSource(InName, T::StaticClass());
72 if (DataSource == nullptr)
73 {
74 return nullptr;
75 }
76 return Cast<T>(DataSource);
77 }
78
79private:
80
83
85 ANIMATIONCORE_API void ClearInvalidDataSource();
86};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition NameTypes.h:617
Definition UnrealString.h.inl:34
Definition AnimationDataSource.h:21
T * RequestSource(const FName &InName) const
Definition AnimationDataSource.h:69
Definition Class.h:3793
Definition Object.h:95