Low-Level C++ SDK  v1.2.0
Loading...
Searching...
No Matches
WeArtMessageListener Class Referenceabstract

Message Listener basic interface. More...

#include <WeArtMessageListener.h>

Inheritance diagram for WeArtMessageListener:
[legend]

Public Member Functions

 WeArtMessageListener (std::set< std::string > ids)
 Basic message listener constructor.
 
bool accept (std::string id)
 Tells if a given ID can be processed by the listener.
 
virtual void OnMessageReceived (WeArtMessage *message)=0
 Callback called when an accepted message is received.
 

Protected Attributes

std::set< std::string > acceptedIds
 

Detailed Description

Message Listener basic interface.

Constructor & Destructor Documentation

◆ WeArtMessageListener()

WeArtMessageListener::WeArtMessageListener ( std::set< std::string >  ids)
inline

Basic message listener constructor.

Parameters
idsList of the ID of accepted messages

Member Function Documentation

◆ accept()

bool WeArtMessageListener::accept ( std::string  id)
inline

Tells if a given ID can be processed by the listener.

Parameters
idID of the message to process
Returns
true if the message is accepted by the listener, false otherwise

◆ OnMessageReceived()

virtual void WeArtMessageListener::OnMessageReceived ( WeArtMessage *  message)
pure virtual

Callback called when an accepted message is received.

Parameters
messageReceived message

Implemented in MiddlewareStatusListener, WeArtAnalogSensorData, WeArtThimbleTrackingObject, and WeArtTrackingRawData.

Member Data Documentation

◆ acceptedIds

std::set<std::string> WeArtMessageListener::acceptedIds
protected

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