Class Variant
Defined in File Variant.h
Nested Relationships
Nested Types
Class Documentation
-
class Variant
Variant is an intermediate class that enables clients to pack data into types that are supported by Connected Spaces Platform replication systems.
Public Functions
-
Variant()
A default Variant will not have a valid type (“VariantType::InvalidType”), and will have no internal value associated.
Do not use this constructor unless you know what you are doing!
-
Variant(bool InBoolValue)
Construct a Variant based on a bool type.
- Parameters
InBoolValue – bool : In value
-
Variant(double InFloatValue)
Construct a Variant based on a double-precision float type.
- Parameters
InFloatValue – double : In value
-
Variant(int64_t InLongValue)
Construct a Variant based on a Long (uint64_t) type.
- Parameters
InLongValue – int64_t : In value
-
Variant(const char *InStringValue)
Construct a Variant based on a cstring (const char*) type.
- Parameters
InStringValue – const char* : In value
-
Variant(String InStringValue)
Construct a Variant based on an csp::common::String type.
- Parameters
InStringValue – csp::common::String : In value
-
Variant(Vector3 InVector3Value)
Construct a Variant based on a csp::common::Vector3 type.
- Parameters
InVector3Value – csp::common::Vector3 : In value
-
Variant(Vector4 InVector4Value)
Construct a Variant based on an csp::common::Vector4 type.
- Parameters
InVector4Value – csp::common::Vector4 : In value
-
~Variant()
Destructor.
-
inline VariantType GetValueType() const
Gets the type of replicated value.
- Returns
VariantType : The current variant internal type
-
void SetBool(bool InValue)
Sets internal variant type as a bool.
-
bool GetBool() const
Gets internal variant type as a bool.
- Returns
bool
-
void SetFloat(double InValue)
Sets internal variant type as a double-precision float.
-
double GetFloat() const
Gets internal variant type as a double-precision float.
- Returns
double
-
void SetInt(int64_t InValue)
Sets internal variant type as an int64_t.
-
int64_t GetInt() const
Gets internal variant type as a int64_t.
- Returns
int16_t
-
const String &GetString() const
Gets internal variant type as a String.
- Returns
const csp::common::String&
Public Static Functions
-
static size_t GetSizeOfInternalValue()
Static utility function to get the size in bytes of an InternalValue.
- Returns
size_t
-
Variant()