qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::io::async::event::base< _EV_EVENT > Class Template Reference

Base template class for all qb-io specific asynchronous event types. More...

#include <base.h>

Inheritance diagram for qb::io::async::event::base< _EV_EVENT >:
Collaboration diagram for qb::io::async::event::base< _EV_EVENT >:

Public Types

using ev_t = _EV_EVENT
 Alias for the underlying libev event watcher type.

Public Member Functions

 base (ev::loop_ref loop)
 Constructor.

Public Attributes

IRegisteredKernelEvent_interface
 Pointer to the kernel event interface responsible for handling this event.
int _revents
 Stores the event flags (e.g., EV_READ, EV_WRITE) received from libev when the event triggers.

Detailed Description

template<typename _EV_EVENT>
class qb::io::async::event::base< _EV_EVENT >

Base template class for all qb-io specific asynchronous event types.

This template class serves as the foundation for specific event wrappers like qb::io::async::event::io, qb::io::async::event::timer, etc. It wraps the corresponding libev event watcher (e.g. ev::io, ev::timer) and holds a pointer to the IRegisteredKernelEvent interface for dispatching.

Template Parameters
_EV_EVENTThe libev event watcher type (e.g. ev::io, ev::timer) being wrapped.

Constructor & Destructor Documentation

◆ base()

template<typename _EV_EVENT>
qb::io::async::event::base< _EV_EVENT >::base ( ev::loop_ref loop)
inlineexplicit

Constructor.

Parameters
loopReference to the libev event loop (ev::loop_ref) this event will be associated with.