CppWAMP
C++11 client library for the WAMP protocol
|
Wrapper around a WAMP message containing an options dictionary. More...
#include <cppwamp/options.hpp>
Public Member Functions | |
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... | |
Protected Member Functions | |
template<typename... TArgs> | |
Options (TArgs &&... args) | |
Constructor taking message construction aruments. | |
Wrapper around a WAMP message containing an options dictionary.
|
inline |
Obtains an option by key or a fallback value.
key | The key to search under. |
fallback | The fallback value to return if the key was not found. |