FVariantData

Container for storing data of variable type

Windows
MacOS
Linux

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

Name Description

Public function

FVariantData()

Constructor

Public function

FVariantData

(
    const ValueType& InData
)

Constructor starting with an initialized value/type

Public function

FVariantData

(
    const FVariantData& Other
)

Copy constructor. Copies the other into this object

Public function

FVariantData

(
    FVariantData&& Other
)

Move constructor. Moves the other into this object

Destructors

Name Description

Public function

~FVariantData()

Cleans up the data to prevent leaks

Functions

Name Description

Public function Const

void

 

AddToJsonObject

(
    const TSharedRef< FJsonObject >& J...,
    const FString& Name,
    const bool bWithTypeSuffix
)

Insert variant data into json object

Public function

void

 

Decrement

(
    TYPE DecBy
)

Decrements the value by the specified amount

Public function

void

 

Empty()

Cleans up the existing data and sets the type to ODT_Empty

Public function

bool

 

FromJson

(
    const TSharedRef< class FJsonObject...
)

Convert json object to variant data from "type,value" fields

Public function

bool

 

FromJsonValue

(
    const FString& Name,
    const TSharedRef< class FJsonValue ...,
    FString& OutName
)

Convert json object to variant data from Name_

Public function

bool

 

FromString

(
    const FString& NewValue
)

Converts the string to the specified type of data for this setting

Public function Const

const EOnlin...

 

GetType()

Get the key for this key value pair

Public function Const

const TCHAR ...

 

GetTypeString()

Public function Const

FString

 

GetTypeSuffix()

Combine the type suffix given this variant's type

Public function Const

void

 

GetValue

(
    uint64& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    TArray< TSharedPtr< class FJsonValu...
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    TArray< uint8 >& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    double& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    TSharedPtr< class FJsonObject >& O...
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    int64& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    uint32& OutSize,
    uint8** OutData
)

Copies the data after verifying the type.

Public function Const

void

 

GetValue

(
    float& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    bool& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    uint32& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    int32& OutData
)

Copies the data after verifying the type

Public function Const

void

 

GetValue

(
    FString& OutData
)

Copies the data after verifying the type

Public function

void

 

Increment

(
    TYPE IncBy
)

Increments the value by the specified amount

Public function Const

bool

 

IsNumeric()

Returns true if Type is numeric

Public function

void

 

SetJsonValueFromString

(
    const FString& InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    uint64 InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    int64 InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    const TArray< uint8 >& InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    float InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    double InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    bool InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    const FString& InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    int32 InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    const TCHAR* InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    const TSharedRef< class FJsonObject...
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    uint32 InData
)

Copies the data and sets the type

Public function

void

 

SetValue

(
    uint32 Size,
    const uint8* InData
)

Copies the data and sets the type

Public function Const

TSharedRef< ...

 

ToJson()

Convert variant data to json object with "type,value" fields

Public function Const

FString

 

ToString()

Converts the data into a string representation

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FVariantData& Other
)

Public function

FVariantData...

 

operator=

(
    const FVariantData& Other
)

Assignment operator. Copies the other into this object

Public function

FVariantData...

 

operator=

(
    FVariantData&& Other
)

Move Assignment operator. Moves the other into this object

Public function Const

bool

 

operator==

(
    const FVariantData& Other
)

Comparison of two settings data classes

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss