variant#

Fully qualified name: carb::variant

namespace variant#

Namespace for carb.variant.plugin and related utilities.

Classes#

Registrar

Lifetime management wrapper for IVariant::registerType() .

Variant

A wrapper class for managing the lifetime of VariantData and converting the contained value to C++ types.

VariantArray

An array-of-variants type that can itself be contained in a Variant .

VariantMap

An associative array (i.e.

Functions#

VariantData translate(Type &&type) noexcept

A helper function to translate a typed value into a VariantData via a Translator .

Structs#

IVariant

Interface for carb.variant.plugin

KeyValuePair

A representation of a key value pair, similar to std::pair<const Variant, Variant> .

Translator

Default implementation of a Translator type.

VTable

A v-table definition for a variant type. Each registered type has a unique v-table pointer that is retrievable via IVariant::getVTable() . Each entry in the v-table is a function with a default behavior if nullptr .

VariantData

A standard-layout.

traits

A structure containing functions for performing the prescribed actions on a VariantData . The functions handle the default behavior if the v-table or v-table function are nullptr .

Typedefs#

VariantArrayPtr

Helper definition.

VariantMapPtr

Helper definition.

Variables#

constexpr RString eBool

Represents bool .

constexpr RString eCharPtr

Represents char* or const char*

constexpr RString eDictionary

Represents dictionary::Item .

constexpr RString eDouble

Represents double .

constexpr RString eFloat

Represents float .

constexpr RString eIObject

Represents IObject .

constexpr RString eInt16

Represents int16_t or short

constexpr RString eInt32

Represents int32_t or int

constexpr RString eInt64

Represents int64_t or long long

constexpr RString eInt8

Represents int8_t or signed char

constexpr RString eNull

Represents nullptr .

constexpr RString eRString

Represents RString .

constexpr RString eRStringKey

Represents RStringKey .

constexpr RString eRStringU

Represents RStringU .

constexpr RString eRStringUKey

Represents RStringUKey .

constexpr RString eString

Represents omni::string .

constexpr RString eUInt16

Represents uint16_t or unsigned short

constexpr RString eUInt32

Represents uint32_t or unsigned int

constexpr RString eUInt64

Represents uint64_t or unsigned long long

constexpr RString eUInt8

Represents uint8_t or unsigned char

constexpr RString eVariantArray

Represents VariantArray* .

constexpr RString eVariantMap

Represents VariantMap* .

constexpr RString eVariantPair

Represents std::pair<Variant, Variant>