2022-02-28 14:13:31 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
2022-02-28 19:52:43 +01:00
|
|
|
#include <iostream>
|
2022-02-28 14:13:31 +01:00
|
|
|
|
2022-03-01 15:06:59 +01:00
|
|
|
#include "definitions.h"
|
|
|
|
|
2022-02-28 19:52:43 +01:00
|
|
|
struct EventInfo {
|
|
|
|
// That was just for testing, follow rule of 0
|
|
|
|
/*
|
|
|
|
EventInfo () {}
|
|
|
|
|
|
|
|
EventInfo (const EventInfo& other): event(other.event), p1(other.p1), p2(other.p2) {
|
|
|
|
std::cout << "Event info copy ctor called" << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
EventInfo &operator= (const EventInfo& other) {
|
|
|
|
std::cout << "Event info assignment ctor called" << std::endl;
|
|
|
|
this->event = other.event;
|
|
|
|
this->p1 = other.p1;
|
|
|
|
this->p2 = other.p2;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
EventInfo &operator= (EventInfo&& other) {
|
|
|
|
std::cout << "Event info move ctor called" << std::endl;
|
|
|
|
this->event = other.event;
|
|
|
|
this->p1 = other.p1;
|
|
|
|
this->p2 = other.p2;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint32_t event = 0;
|
|
|
|
uint32_t p1 = 0;
|
|
|
|
uint32_t p2 = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void triggerEvent(Event event, uint32_t p1, uint32_t p2);
|
|
|
|
|
|
|
|
void eventWasCalled(EventInfo& eventInfo, uint32_t& numEvents);
|