Class EpollEventHandler

Inheritance Relationships

Derived Types

Class Documentation

class EpollEventHandler

Abstract base class implemented for each type of event (e.g., Timer, Subscription, Shutdown events). Please refer to EpollEventType for details on event classification. Derived classes inheriting from this class must implement the processing logic specific to each event.

Subclassed by agnocast::ClockEventHandler, agnocast::DummyEventHandler, agnocast::ShutdownEventHandler, agnocast::SubscriptionEventHandler, agnocast::TimerEventHandler

Public Functions

EpollEventHandler() = default
virtual ~EpollEventHandler() = default
EpollEventHandler(const EpollEventHandler&) = delete
EpollEventHandler &operator=(const EpollEventHandler&) = delete
EpollEventHandler(EpollEventHandler&&) = delete
EpollEventHandler &operator=(EpollEventHandler&&) = delete
virtual EpollEventType get_type() const = 0
virtual void prepare_epoll(int epoll_fd, const CallbackGroupValidator &validate_callback_group) = 0

Configures event-specific settings, such as adding events to epoll.

Parameters:
  • epoll_fd – The file descriptor for the epoll instance.

  • validate_callback_group – A function that takes a callback group and determines whether the entities belonging to that group are under its management.

virtual void handle(EpollEventLocalID event_local_id) = 0

Invoked when an event belonging to this event type occurs.

Parameters:

event_local_id – The local ID used to identify the specific event.