5#include "CoreMinimal.h"
6#include "OptionalTypes.generated.h"
13 TOptional<
int> OptionalValue;
20 if (OptionalValue.IsSet())
22 return *OptionalValue;
29 IsSet = OptionalValue.IsSet();
32 return *OptionalValue;
39 OptionalValue = Value;
44 return OptionalValue.IsSet();
47 virtual int operator*()
53 virtual void operator=(
const int& Value)
55 OptionalValue = Value;
64 TOptional<float> OptionalValue;
71 if (OptionalValue.IsSet())
73 return *OptionalValue;
78 float Get(
bool& IsSet)
80 IsSet = OptionalValue.IsSet();
83 return *OptionalValue;
90 OptionalValue = Value;
95 return OptionalValue.IsSet();
98 virtual float operator*()
104 virtual void operator=(
const float& Value)
106 OptionalValue = Value;
110USTRUCT(BlueprintType)
115 TOptional<bool> OptionalValue;
122 if (OptionalValue.IsSet())
131 IsSet = OptionalValue.IsSet();
134 return *OptionalValue;
141 OptionalValue = Value;
146 return OptionalValue.IsSet();
149 virtual bool operator*()
155 virtual void operator=(
const bool& Value)
157 OptionalValue = Value;
virtual void operator=(const bool &Value)
TOptional< bool > OptionalValue
virtual ~FOptionalFloat()
virtual void operator=(const float &Value)
virtual float operator*()
TOptional< float > OptionalValue
TOptional< int > OptionalValue
virtual void operator=(const int &Value)