Wrapper around a WAMP message containing payload arguments and an options dictionary.
More...
|
template<typename... Ts> |
TDerived & | withArgs (Ts &&... args) |
| Sets the positional arguments for this payload.
|
|
template<typename... Ts> |
TDerived & | withArgsTuple (const std::tuple< Ts... > &tuple) |
| Sets the positional arguments for this payload from a tuple.
|
|
TDerived & | withArgList (Array args) |
| Sets the positional arguments for this payload from an array of variants. More...
|
|
TDerived & | withKwargs (Object kwargs) |
| Sets the keyword arguments for this payload. More...
|
|
const Array & | args () const & |
| Accesses the constant list of positional arguments. More...
|
|
Array | args () && |
| Returns the moved list of positional arguments.
|
|
const Object & | kwargs () const & |
| Accesses the constant map of keyword arguments. More...
|
|
Object | kwargs () && |
| Returns the moved map of keyword arguments.
|
|
Variant & | operator[] (size_t index) |
| Accesses a positional argument by index. More...
|
|
const Variant & | operator[] (size_t index) const |
| Accesses a constant positional argument by index. More...
|
|
Variant & | operator[] (const String &keyword) |
| Accesses a keyword argument by key. More...
|
|
template<typename... Ts> |
size_t | convertTo (Ts &... values) const |
| Converts the payload's positional arguments to the given value types. More...
|
|
template<typename... Ts> |
size_t | convertToTuple (std::tuple< Ts... > &tuple) const |
| Converts the payload's positional arguments to the given std::tuple.
|
|
template<typename... Ts> |
size_t | moveTo (Ts &... values) |
| Moves the payload's positional arguments to the given value references. More...
|
|
template<typename... Ts> |
size_t | moveToTuple (std::tuple< Ts... > &tuple) |
| Moves the payload's positional arguments to the given std::tuple.
|
|
template<typename... Ts> |
D & | withArgs (Ts &&... args) |
| Each argument is converted to a Variant using Variant::from. More...
|
|
template<typename... Ts> |
D & | withArgsTuple (const std::tuple< Ts... > &tuple) |
| Each tuple element is converted to a Variant using Variant::from. More...
|
|
TDerived & | withOption (String key, Variant value) |
| Adds an option.
|
|
TDerived & | withOptions (Object opts) |
| Sets all options at once.
|
|
const Object & | options () const |
| Accesses the entire dictionary of options.
|
|
Variant | optionByKey (const String &key) const |
| Obtains an option by key.
|
|
template<typename T > |
ValueTypeOf< T > | optionOr (const String &key, T &&fallback) const |
| Obtains an option by key or a fallback value. More...
|
|
template<typename TDerived, typename TMessage>
class wamp::Payload< TDerived, TMessage >
Wrapper around a WAMP message containing payload arguments and an options dictionary.