async_mqtt 9.0.1
Loading...
Searching...
No Matches
async_mqtt::topic_subopts Class Reference

subsscription entry More...

#include <topic_subopts.hpp>

Public Member Functions

 topic_subopts (std::string all_topic, sub::opts opts)
 constructor
 
std::string const & topic () const
 Get topic.
 
std::string const & sharename () const
 Get sharename.
 
std::string const & all_topic () const
 Get all_topic.
 
sub::opts const & opts () const
 Get subscribe options.
 
 operator bool () const
 bool conversion
 

Friends

bool operator< (topic_subopts const &lhs, topic_subopts const &rhs)
 less than operator
 
bool operator== (topic_subopts const &lhs, topic_subopts const &rhs)
 equal operator
 

Detailed Description

subsscription entry

Thread Safety

  • Distinct objects: Safe
  • Shared objects: Unsafe

Requirements

Constructor & Destructor Documentation

◆ topic_subopts()

async_mqtt::topic_subopts::topic_subopts ( std::string all_topic,
sub::opts opts )
inline

constructor

Parameters
all_topicTopicFilter. It could contain sharename on MQTT v5.0.
optssubscribe options

Member Function Documentation

◆ all_topic()

std::string const & async_mqtt::topic_subopts::all_topic ( ) const
inline

Get all_topic.

If sharename is contained, $share/ prefix is contained.

Returns
all_topic that is given to the constructor.

◆ operator bool()

async_mqtt::topic_subopts::operator bool ( ) const
inline

bool conversion

Returns
if topic is empty (invalid) then return false, otherwise true.

◆ opts()

sub::opts const & async_mqtt::topic_subopts::opts ( ) const
inline

Get subscribe options.

Returns
subscribe options

◆ sharename()

std::string const & async_mqtt::topic_subopts::sharename ( ) const
inline

Get sharename.

Returns
sharename. If no sharename then return empty size std::string.

◆ topic()

std::string const & async_mqtt::topic_subopts::topic ( ) const
inline

Get topic.

Returns
topic

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( topic_subopts const & lhs,
topic_subopts const & rhs )
friend

less than operator

Parameters
lhscompare target
rhscompare target
Returns
true if the lhs less than the rhs, otherwise false.

◆ operator==

bool operator== ( topic_subopts const & lhs,
topic_subopts const & rhs )
friend

equal operator

Parameters
lhscompare target
rhscompare target
Returns
true if the lhs equal to the rhs, otherwise false.

The documentation for this class was generated from the following file: