Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Classes | Public Member Functions | Friends | List of all members
keyple::core::seproxy::event::PluginEvent Class Referencefinal

#include <PluginEvent.h>

Classes

class  EventType
 

Public Member Functions

 PluginEvent (const std::string &pluginName, const std::string &readerName, const EventType &eventType)
 
 PluginEvent (const std::string &pluginName, std::shared_ptr< std::set< std::string >> readerNames, const EventType &eventType)
 
const std::string & getPluginName () const
 
const std::set< std::string > & getReaderNames () const
 
const EventTypegetEventType () const
 

Friends

KEYPLECORE_API std::ostream & operator<< (std::ostream &os, const PluginEvent &pe)
 
KEYPLECORE_API std::ostream & operator<< (std::ostream &os, const std::shared_ptr< PluginEvent > &pe)
 

Detailed Description

A PluginEvent is used to propagate a change of reader currentState in reader plugin.

The getReaderNames and getEventType methods allow the event recipient to retrieve the names of the readers involved and the type of the event.

At the moment, two types of events are supported: a connection or disconnection of the reader.

Since the event provides a list of reader names, a single event can be used to notify a change for one or more readers.

However, only one type of event is notified at a time.

Constructor & Destructor Documentation

◆ PluginEvent() [1/2]

keyple::core::seproxy::event::PluginEvent::PluginEvent ( const std::string &  pluginName,
const std::string &  readerName,
const EventType eventType 
)

Create a PluginEvent for a single reader

Parameters
pluginNamename of the plugin
readerNamename of the reader
eventTypetype of the event, connection or disconnection

◆ PluginEvent() [2/2]

keyple::core::seproxy::event::PluginEvent::PluginEvent ( const std::string &  pluginName,
std::shared_ptr< std::set< std::string >>  readerNames,
const EventType eventType 
)

Create a PluginEvent for multiple readers

Parameters
pluginNamename of the plugin
readerNameslist of reader names
eventTypetype of the event, connection or disconnection

Member Function Documentation

◆ getEventType()

const EventType & keyple::core::seproxy::event::PluginEvent::getEventType ( ) const

◆ getPluginName()

const std::string & keyple::core::seproxy::event::PluginEvent::getPluginName ( ) const

◆ getReaderNames()

const std::set< std::string > & keyple::core::seproxy::event::PluginEvent::getReaderNames ( ) const

Friends And Related Function Documentation

◆ operator<< [1/2]

KEYPLECORE_API std::ostream& operator<< ( std::ostream &  os,
const PluginEvent pe 
)
friend

◆ operator<< [2/2]

KEYPLECORE_API std::ostream& operator<< ( std::ostream &  os,
const std::shared_ptr< PluginEvent > &  pe 
)
friend

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