added distribution events
This commit is contained in:
35
FlippR-Driver/src/input/DistributingEvent.h
Normal file
35
FlippR-Driver/src/input/DistributingEvent.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// Created by rhetenor on 21.09.18.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_DISTRIBUTINGEVENT_H
|
||||
#define FLIPPR_DRIVER_DISTRIBUTINGEVENT_H
|
||||
|
||||
#include "Event.h"
|
||||
#include "IEventNotifier.h"
|
||||
|
||||
namespace FlippR_Driver
|
||||
{
|
||||
namespace Input
|
||||
{
|
||||
class DistributingEvent : public Event
|
||||
{
|
||||
public:
|
||||
DistributingEvent(char address, int priority, std::string name,
|
||||
std::chrono::milliseconds deactivation_time, std::shared_ptr<IEventNotifier> event_notifier);
|
||||
|
||||
void distribute();
|
||||
|
||||
public:
|
||||
std::chrono::milliseconds deactivation_time;
|
||||
|
||||
private:
|
||||
std::shared_ptr<IEventNotifier> event_notifier;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_activation;
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif //FLIPPR_DRIVER_DISTRIBUTINGEVENT_H
|
||||
Reference in New Issue
Block a user