Flyby SDK v1.0.2
Loading...
Searching...
No Matches
flyby::Subscriber Class Referenceabstract

The class used for subscribing to the message bus. More...

#include <subscriber.h>

Inheritance diagram for flyby::Subscriber:

Public Member Functions

virtual bool is_connected ()=0
 Check if the subscriber is connected.
virtual std::shared_ptr< SubscribeObservablesubscribe (const std::string &topic)=0
 Subscribe to a topic on the message bus.

Static Public Member Functions

static std::shared_ptr< Subscribercreate (const std::string &client_id)
 Creates a subscriber handler.

Detailed Description

The class used for subscribing to the message bus.

This class is used only for subscribing to topics.

Member Function Documentation

◆ create()

std::shared_ptr< Subscriber > flyby::Subscriber::create ( const std::string & client_id)
static

Creates a subscriber handler.

Parameters
client_id- The ID of the user that is subscribing.
Returns
Subscriber handler.

◆ is_connected()

virtual bool flyby::Subscriber::is_connected ( )
pure virtual

Check if the subscriber is connected.

Returns
True if the subscriber is connected to the message bus.

Implemented in flyby::Client.

◆ subscribe()

virtual std::shared_ptr< SubscribeObservable > flyby::Subscriber::subscribe ( const std::string & topic)
nodiscardpure virtual

Subscribe to a topic on the message bus.

Parameters
topic- The topic to subscribe to.
Returns
The subscribe observable.

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