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