Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#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 EventType & | getEventType () 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) |
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.
keyple::core::seproxy::event::PluginEvent::PluginEvent | ( | const std::string & | pluginName, |
const std::string & | readerName, | ||
const EventType & | eventType | ||
) |
Create a PluginEvent for a single reader
pluginName | name of the plugin |
readerName | name of the reader |
eventType | type of the event, connection or disconnection |
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
pluginName | name of the plugin |
readerNames | list of reader names |
eventType | type of the event, connection or disconnection |
const EventType & keyple::core::seproxy::event::PluginEvent::getEventType | ( | ) | const |
const std::string & keyple::core::seproxy::event::PluginEvent::getPluginName | ( | ) | const |
const std::set< std::string > & keyple::core::seproxy::event::PluginEvent::getReaderNames | ( | ) | const |
|
friend |
|
friend |