#include <Variant.hpp>
Public Member Functions | |
bool | isTrueish () const |
bool | valueAsBoolean () const |
get value as a bool More... | |
double | valueAsDouble () const |
get value as double More... | |
int | valueAsInteger () const |
get value as int More... | |
Json::Value | valueAsJSON () const |
std::string | valueAsString () const |
get value as string More... | |
Variant () | |
constructors More... | |
Variant (bool value) | |
Variant (double value) | |
Variant (int value) | |
Variant (const char *value) | |
Variant (const std::string &value) | |
VariantType | variantType () const |
get the variant value type More... | |
Related Functions | |
(Note that these are not member functions.) | |
using | OptionalVariant = std::optional< Variant > |
using | VariantVector = std::vector< Variant > |
A Variant is a flexible type that can hold several types of values.
|
explicit |
constructors
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
bool openstudio::Variant::isTrueish | ( | ) | const |
bool openstudio::Variant::valueAsBoolean | ( | ) | const |
get value as a bool
double openstudio::Variant::valueAsDouble | ( | ) | const |
get value as double
int openstudio::Variant::valueAsInteger | ( | ) | const |
get value as int
Json::Value openstudio::Variant::valueAsJSON | ( | ) | const |
std::string openstudio::Variant::valueAsString | ( | ) | const |
get value as string
VariantType openstudio::Variant::variantType | ( | ) | const |
get the variant value type
|
related |
|
related |