You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
First set of tests for the new property bag. This exercises: Add, LoadFromTag, Remove, Iteration, storage https://epicgames.slack.com/archives/C05HDDK8VUP/p1706200984745359?thread_ts=1706198804.429209&cid=C05HDDK8VUP #jira UE-202459 #rb Devin.Doucette [CL 31560445 by andrew phillips in ue5-main branch]
143 lines
2.6 KiB
C++
143 lines
2.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "UObject/Object.h"
|
|
#include "PropertyBagTest.generated.h"
|
|
|
|
UCLASS()
|
|
class UTestPropertyBag1Int : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int32 TheInt = -1;
|
|
};
|
|
|
|
|
|
UENUM(BlueprintType)
|
|
enum class ETestPropertyBagEnum : uint8
|
|
{
|
|
ValueA,
|
|
ValueB,
|
|
ValueC,
|
|
};
|
|
|
|
UCLASS()
|
|
class UTestPropertyBagABCD : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
FString A;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
ETestPropertyBagEnum B = ETestPropertyBagEnum::ValueA;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int32 C = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
float D = 100.f;
|
|
};
|
|
|
|
UCLASS()
|
|
class UTestPropertyBagABEF : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
FString A;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
ETestPropertyBagEnum B = ETestPropertyBagEnum::ValueA;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int32 E = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
float F = 100.f;
|
|
};
|
|
|
|
UCLASS()
|
|
class UTestPropertyBagABCDABEF : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
FString A;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
TObjectPtr<UTestPropertyBagABCD> ABCD;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int32 E = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
TObjectPtr<UTestPropertyBagABEF> ABEF;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
float F = 100.f;
|
|
};
|
|
|
|
UCLASS()
|
|
class UTestPropertyBagArrayOfString : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
TArray<FString> Arr;
|
|
};
|
|
|
|
UCLASS()
|
|
class UTestPropertyBagAllSupportedTypes : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
TArray<TObjectPtr<UTestPropertyBagAllSupportedTypes>> Arr;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
TMap<FString, int32> Map;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
FString A;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int32 B = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int8 B8 = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int16 B16 = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
int64 B64 = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
float C = 100.f;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
double D = 100.;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
uint32 E = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
uint8 E8 = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
uint16 E16 = -1;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Text")
|
|
uint64 E64 = -1;
|
|
};
|