7#if !defined(ASYNC_MQTT_PACKET_PROPERTY_VARIANT_HPP)
8#define ASYNC_MQTT_PACKET_PROPERTY_VARIANT_HPP
12#include <async_mqtt/util/overload.hpp>
13#include <async_mqtt/packet/property.hpp>
100 template <
typename Func>
107 template <
typename Func>
114 template <
typename Func>
146 template <
typename T>
153 template <
typename T>
154 decltype(
auto)
get()
const;
160 template <
typename T>
167 template <
typename T>
178 friend std::ostream& operator<<(std::ostream& o,
property_variant const& v);
181 using variant_t = std::variant<
284#include <async_mqtt/packet/impl/property_variant.hpp>
shared_subscription_available property
Definition property.hpp:1581
property variant
Definition property_variant.hpp:74
decltype(auto) get()
Get by type. If not match, then throw std::bad_variant_access exception.
property_variant()=default
constructor property variant value is std::monostate
std::size_t size() const
Get packet size.
friend bool operator==(property_variant const &lhs, property_variant const &rhs)
equal operator
property::id id() const
Get property_id.
std::vector< as::const_buffer > const_buffer_sequence() const
Create const buffer sequence. it is for boost asio APIs.
decltype(auto) get_if() const
Get by type pointer.
property_variant(Property &&property)
constructor
decltype(auto) get_if()
Get by type pointer.
auto visit(Func &&func) &
visit to variant
decltype(auto) get() const
Get by type. If not match, then throw std::bad_variant_access exception.
std::size_t num_of_const_buffer_sequence() const
Get number of element of const_buffer_sequence.
auto visit(Func &&func) const &
visit to variant
friend bool operator<(property_variant const &lhs, property_variant const &rhs)
less than operator
auto visit(Func &&func) &&
visit to variant
std::ostream & operator<<(std::ostream &o, mqtt_error v)
output to the stream
id
MQTT property identifier.
Definition property_id.hpp:28
std::vector< property_variant > properties
property variant collection type
Definition property_variant.hpp:224
@ subscription_identifier
Subscription Identifier.
@ request_problem_information
Request Problem Information.
@ reason_string
Reason String.
@ server_reference
Server Reference.
@ maximum_qos
Maximum QoS.
@ response_topic
Response Topic.
@ retain_available
Retain Available.
@ message_expiry_interval
Message Expiry Interval.
@ request_response_information
Request Response Information.
@ authentication_data
Authentication Data.
@ session_expiry_interval
Session Expiry Interval.
@ receive_maximum
Receive Maximum.
@ assigned_client_identifier
Assigned Client Identifier.
@ server_keep_alive
Server Keep Alive.
@ topic_alias
Topic Alias.
@ topic_alias_maximum
Topic Alias Maximum.
@ authentication_method
Authentication Method.
@ subscription_identifier_available
Subscription Identifier Available.
@ user_property
User Property.
@ payload_format_indicator
Payload Format Indicator.
@ will_delay_interval
Will Delay Interval.
@ wildcard_subscription_available
Wildcard Subscription Available.
@ maximum_packet_size
Maximum Packet Size.
@ content_type
Content Type.
@ correlation_data
Correlation Data.
@ response_information
Response Information.
bool operator==(property_variant const &lhs, property_variant const &rhs)
equal operator
bool operator<(property_variant const &lhs, property_variant const &rhs)
less than operator