Navigation
API > API/Plugins > API/Plugins/OnlineSubsystem
Container for storing data of variable type
| Name | FVariantData |
| Type | class |
| Header File | /Engine/Plugins/Online/OnlineSubsystem/Source/Public/OnlineKeyValuePair.h |
| Include Path | #include "OnlineKeyValuePair.h" |
Syntax
class FVariantData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVariantData
(
FVariantData&& Other |
Move constructor. Moves the other into this object | OnlineKeyValuePair.h | |
FVariantData
(
const FVariantData& Other |
Copy constructor. Copies the other into this object | OnlineKeyValuePair.h | |
FVariantData
(
const ValueType& InData |
Constructor starting with an initialized value/type | OnlineKeyValuePair.h | |
FVariantData () |
Constructor | OnlineKeyValuePair.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FVariantData() |
Cleans up the data to prevent leaks | OnlineKeyValuePair.h |
Classes
| Name | Remarks |
|---|---|
| ValueUnion | Union of all possible types that can be stored |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedEstimatedMaxEscapedStringSize | int | Cached estimated maximum size of the value when encoded as an escaped string. | OnlineKeyValuePair.h | |
| Type | EOnlineKeyValuePairDataType::Type | Current data type | OnlineKeyValuePair.h | |
| Value | union FVariantData::ValueUnion | OnlineKeyValuePair.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddToJsonObject
(
const TSharedRef< FJsonObject >& JsonObject, |
Insert variant data into json object | OnlineKeyValuePair.h | |
void Decrement
(
TYPE DecBy |
Decrements the value by the specified amount | OnlineKeyValuePair.h | |
void Decrement () |
Decrements the numeric value by 1 | OnlineKeyValuePair.h | |
void Empty () |
Cleans up the existing data and sets the type to ODT_Empty | OnlineKeyValuePair.h | |
bool FromJson
(
const TSharedRef< class FJsonObject >& JsonObject |
Convert json object to variant data from "type,value" fields | OnlineKeyValuePair.h | |
bool FromJsonValue
(
const FString& Name, |
Convert json object to variant data from Name_ | OnlineKeyValuePair.h | |
bool FromString
(
const FString& NewValue |
Converts the string to the specified type of data for this setting | OnlineKeyValuePair.h | |
| Returns the estimated maximum size of the value when encoded as an escaped string. | OnlineKeyValuePair.h | ||
const EOnlineKeyValuePairDataType::Type GetType() |
Get the key for this key value pair | OnlineKeyValuePair.h | |
const TCHAR * GetTypeString() |
OnlineKeyValuePair.h | ||
FString GetTypeSuffix() |
Combine the type suffix given this variant's type | OnlineKeyValuePair.h | |
void GetValue
(
uint64& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
TSharedPtr< class FJsonObject >& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
| Copies the data after verifying the type | OnlineKeyValuePair.h | ||
void GetValue
(
double& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
int64& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
TArray< TSharedPtr< class FJsonValue > >& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
uint32& OutSize, |
Copies the data after verifying the type. | OnlineKeyValuePair.h | |
void GetValue
(
float& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
bool& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
uint32& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
void GetValue
(
int32& OutData |
Copies the data after verifying the type | OnlineKeyValuePair.h | |
| Copies the data after verifying the type | OnlineKeyValuePair.h | ||
void Increment
(
TYPE IncBy |
Increments the value by the specified amount | OnlineKeyValuePair.h | |
void Increment () |
Increments the numeric value by 1 | OnlineKeyValuePair.h | |
bool IsNumeric() |
Returns true if Type is numeric | OnlineKeyValuePair.h | |
void SetJsonValueFromString
(
const FString& InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
const TSharedRef< class FJsonObject >& InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
| Copies the data and sets the type | OnlineKeyValuePair.h | ||
void SetValue
(
const TCHAR* InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
int32 InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
uint32 InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
bool InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
double InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
float InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
| Copies the data and sets the type | OnlineKeyValuePair.h | ||
void SetValue
(
int64 InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
uint64 InData |
Copies the data and sets the type | OnlineKeyValuePair.h | |
void SetValue
(
uint32 Size, |
Copies the data and sets the type | OnlineKeyValuePair.h | |
TSharedRef< class FJsonObject > ToJson() |
Convert variant data to json object with "type,value" fields | OnlineKeyValuePair.h | |
FString ToString() |
Converts the data into a string representation | OnlineKeyValuePair.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FVariantData& Other |
OnlineKeyValuePair.h | ||
FVariantData & operator=
(
const FVariantData& Other |
Assignment operator. Copies the other into this object | OnlineKeyValuePair.h | |
FVariantData & operator=
(
FVariantData&& Other |
Move Assignment operator. Moves the other into this object | OnlineKeyValuePair.h | |
bool operator==
(
const FVariantData& Other |
Comparison of two settings data classes | OnlineKeyValuePair.h |