| CppWAMP
    C++11 client library for the WAMP protocol | 
Wrapper around a destination Variant, used for conversions. More...
#include <cppwamp/variant.hpp>
| Public Types | |
| using | SizeType = size_t | 
| Integer type used to represent the size of array variants. | |
| using | String = std::string | 
| String type used to represent an object variant key. | |
| Public Member Functions | |
| ToVariantConverter (Variant &var) | |
| Constructor taking a variant reference. | |
| ToVariantConverter & | size (SizeType n) | 
| Makes the variant become an Array variant.  More... | |
| template<typename T > | |
| ToVariantConverter & | operator() (T &&value) | 
| Assigns a value to the variant.  More... | |
| template<typename T > | |
| ToVariantConverter & | operator[] (T &&value) | 
| Appends an array element to the variant.  More... | |
| template<typename T > | |
| ToVariantConverter & | operator() (String key, T &&value) | 
| Appends an object member to the variant.  More... | |
| template<typename T , typename U > | |
| ToVariantConverter & | operator() (String key, T &&value, U &&ignored) | 
| Appends an object member to the variant.  More... | |
| Variant & | variant () | 
| Returns a reference to the wrapped variant. | |
| Static Public Attributes | |
| static constexpr bool | convertingToVariant = true | 
| Indicates that this converter is used to convert to a variant. | |
Wrapper around a destination Variant, used for conversions.
This wrapper provides a convenient, uniform syntax for inserting values into a destination variant.
| 
 | inline | 
| ToVariantConverter & wamp::ToVariantConverter::operator() | ( | T && | value | ) | 
Assigns a value to the variant.
The given value is converted to a Variant via Variant::from before being assigned.
| ToVariantConverter & wamp::ToVariantConverter::operator[] | ( | T && | value | ) | 
| ToVariantConverter & wamp::ToVariantConverter::operator() | ( | String | key, | 
| T && | value | ||
| ) | 
| ToVariantConverter & wamp::ToVariantConverter::operator() | ( | String | key, | 
| T && | value, | ||
| U && | ignored | ||
| ) |