Ark Server API (ASA) - Wiki
|
#include <Variant.h>
Public Member Functions | |
FVariant () | |
FVariant (const FVariant &)=default | |
FVariant & | operator= (const FVariant &)=default |
~FVariant ()=default | |
FVariant (FVariant &&Other) | |
FVariant & | operator= (FVariant &&Other) |
template<typename T > | |
FVariant (T InValue) | |
FVariant (TArray< uint8 > &&InArray) | |
FVariant (const TArray< uint8 > &InArray) | |
FVariant (const TCHAR *InString) | |
template<typename T > | |
FVariant & | operator= (T InValue) |
FVariant & | operator= (TArray< uint8 > &&InArray) |
FVariant & | operator= (const TArray< uint8 > &InArray) |
FVariant & | operator= (const TCHAR *InString) |
template<typename T > | |
operator T () const | |
bool | operator== (const FVariant &Other) const |
bool | operator!= (const FVariant &Other) const |
void | Empty () |
bool | IsEmpty () const |
const TArray< uint8 > & | GetBytes () const |
int32 | GetSize () const |
EVariantTypes | GetType () const |
template<typename T > | |
T | GetValue () const |
template<> | |
FORCEINLINE TArray< uint8 > | GetValue () const |
Private Attributes | |
EVariantTypes | Type |
TArray< uint8 > | Value |
Friends | |
FArchive & | operator<< (FArchive &Ar, FVariant &Variant) |
Implements an extensible union of multiple types.
Variant types can be used to store a range of different built-in types, as well as user defined types. The values are internally serialized into a byte array, which means that only FArchive serializable types are supported at this time.
|
default |
|
inline |
Creates and initializes a new instance from a byte array.
Array values are passed straight through as an optimization. Please note that, if you serialize any complex types into arrays and then store them in FVariant, you will be responsible for ensuring byte ordering if the FVariant gets sent over the network.
InValue- | The initial value. |
Definition at line 167 of file Variant.h.
|
inline |
|
inline |
Gets the stored value as a byte array.
This method returns the internal representation of any value as an array of raw bytes. To retrieve values of type TArray<uint8> use GetValue<TArray<uint8>>() instead.
|
inline |
|
inline |
FORCEINLINE TArray< uint8 > FVariant::GetValue | ( | ) | const |
Gets the stored value for byte arrays.
Array values are passed straight through as an optimization. Please note that, if you serialize any complex types into arrays and then store them in FVariant, you will be responsible for ensuring byte ordering if the FVariant gets send over the network.
To retrieve any value as an array of serialized bytes, use GetBytes() instead.
|
inline |
Assignment operator for byte arrays.
Array values are passed straight through as an optimization. Please note that, if you serialize any complex types into arrays and then store them in FVariant, you will be responsible for ensuring byte ordering if the FVariant gets sent over the network.
InArray | The byte array to assign. |
|
private |