Files
UnrealEngineUWP/Engine/Source/Runtime/CoreUObject/Tests/ObjectPtrTestClass.h
joe pribele cffacc0be5 support for TObjectPtr handling renames and GetTypeHash(TObjectPtr) no long has to resolve
GetTypeHash will create a packaged object ref for hashing if the class is defined as lazy load otherwise raw pointer is hashed
a map was added for moved objects and ObjectPathId can be a WeakObjectPtr
the map allows UObjects to be mapped back to packed object refs

#rb zousar.shaker
https://p4-swarm.epicgames.net/reviews/23356491
#preflight 63b5de641c35d1cbdbccecf7
#preflight 63b70406e26e31879b8aa6d3

[CL 23589497 by joe pribele in ue5-main branch]
2023-01-05 12:27:16 -05:00

40 lines
795 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if WITH_LOW_LEVEL_TESTS
#include "UObject/Object.h"
//simple test class for testing TObjectPtr resolve behavior
class UObjectPtrTestClass : public UObject
{
DECLARE_CLASS_INTRINSIC(UObjectPtrTestClass, UObject, CLASS_MatchedSerializers, TEXT("/Script/CoreUObject"))
public:
};
//derived test class
class UObjectPtrDerrivedTestClass : public UObjectPtrTestClass
{
DECLARE_CLASS_INTRINSIC(UObjectPtrDerrivedTestClass, UObjectPtrTestClass, CLASS_MatchedSerializers, TEXT("/Script/CoreUObject"))
public:
};
//non lazy test class
class UObjectPtrNotLazyTestClass : public UObject
{
DECLARE_CLASS_INTRINSIC(UObjectPtrNotLazyTestClass, UObject, CLASS_MatchedSerializers, TEXT("/Script/CoreUObject"))
public:
};
#endif