well, the emitter would have not been grateful for that
This commit is contained in:
parent
2a4a2976d4
commit
f72596268b
@ -9,8 +9,6 @@
|
||||
|
||||
namespace uvw {
|
||||
|
||||
// base structures
|
||||
|
||||
|
||||
struct BaseEvent {
|
||||
virtual ~BaseEvent() noexcept = 0;
|
||||
@ -32,28 +30,10 @@ struct Event: BaseEvent {
|
||||
};
|
||||
|
||||
|
||||
// empty events
|
||||
|
||||
|
||||
struct DefaultEvent: Event<DefaultEvent> { };
|
||||
|
||||
using AsyncEvent = DefaultEvent;
|
||||
using CheckEvent = DefaultEvent;
|
||||
using CloseEvent = DefaultEvent;
|
||||
using ConnectEvent = DefaultEvent;
|
||||
using EndEvent = DefaultEvent;
|
||||
using IdleEvent = DefaultEvent;
|
||||
using ListenEvent = DefaultEvent;
|
||||
using PrepareEvent = DefaultEvent;
|
||||
using SendEvent = DefaultEvent;
|
||||
using ShutdownEvent = DefaultEvent;
|
||||
using TimerEvent = DefaultEvent;
|
||||
using UninitializedEvent = DefaultEvent;
|
||||
using WorkEvent = DefaultEvent;
|
||||
using WriteEvent = DefaultEvent;
|
||||
|
||||
|
||||
// specialized events
|
||||
struct AsyncEvent: Event<AsyncEvent> { };
|
||||
struct CheckEvent: Event<CheckEvent> { };
|
||||
struct CloseEvent: Event<CloseEvent> { };
|
||||
struct ConnectEvent: Event<ConnectEvent> { };
|
||||
|
||||
|
||||
struct DataEvent: Event<DataEvent> {
|
||||
@ -70,6 +50,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
struct EndEvent: Event<EndEvent> { };
|
||||
|
||||
|
||||
struct ErrorEvent: Event<ErrorEvent> {
|
||||
explicit ErrorEvent(int code = 0) noexcept: ec(code) { }
|
||||
|
||||
@ -106,6 +89,13 @@ private:
|
||||
};
|
||||
|
||||
|
||||
struct IdleEvent: Event<IdleEvent> { };
|
||||
struct ListenEvent: Event<ListenEvent> { };
|
||||
struct PrepareEvent: Event<PrepareEvent> { };
|
||||
struct SendEvent: Event<SendEvent> { };
|
||||
struct ShutdownEvent: Event<ShutdownEvent> { };
|
||||
|
||||
|
||||
struct SignalEvent: Event<SignalEvent> {
|
||||
explicit SignalEvent(int sig) noexcept: signum(sig) { }
|
||||
|
||||
@ -116,6 +106,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
struct TimerEvent: Event<TimerEvent> { };
|
||||
|
||||
|
||||
struct UDPDataEvent: Event<UDPDataEvent> {
|
||||
explicit UDPDataEvent(Addr addr, std::unique_ptr<const char[]> ptr, ssize_t l, bool trunc) noexcept
|
||||
: dt{std::move(ptr)}, len{l}, sndr{addr}, part{trunc}
|
||||
@ -134,4 +127,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
struct UninitializedEvent: Event<UninitializedEvent> { };
|
||||
struct WorkEvent: Event<WorkEvent> { };
|
||||
struct WriteEvent: Event<WriteEvent> { };
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user