dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Plugins::PollerApi Class Reference

Bridge between the C++ FdWatch::Poller and the C-ABI dfx_poller_api_t. More...

#include <dfx-plugins/api/PollerApi.hpp>

Static Public Member Functions

static dfx_poller_api_t buildPluginPoller (FdWatch::Poller &poller)
 Creates a dfx_poller_api_t vtable for a specific Poller instance.
static constexpr FdWatch::EventInterests pluginEventToDfx (dfx_event_interest_t event) noexcept
 Converts C-ABI event interests to internal FdWatch interests.
static constexpr dfx_event_trigger_t dfxEventToPlugin (FdWatch::EventTriggers events) noexcept
 Converts internal FdWatch triggers to C-ABI event triggers.

Detailed Description

Bridge between the C++ FdWatch::Poller and the C-ABI dfx_poller_api_t.

This class provides static utilities to convert event interests and triggers between internal C++ enums and C-ABI bitfields. It also builds the function pointer vtable required for plugins to interact with the host's event loop.

Member Function Documentation

◆ buildPluginPoller()

dfx_poller_api_t dfx::Plugins::PollerApi::buildPluginPoller ( FdWatch::Poller & poller)
static

Creates a dfx_poller_api_t vtable for a specific Poller instance.

The resulting structure contains lambdas that wrap C++ Poller methods.

Note
The returned struct is only valid as long as the poller instance exists.

◆ dfxEventToPlugin()

constexpr dfx_event_trigger_t dfx::Plugins::PollerApi::dfxEventToPlugin ( FdWatch::EventTriggers events)
staticconstexprnoexcept

Converts internal FdWatch triggers to C-ABI event triggers.

◆ pluginEventToDfx()

constexpr FdWatch::EventInterests dfx::Plugins::PollerApi::pluginEventToDfx ( dfx_event_interest_t event)
staticconstexprnoexcept

Converts C-ABI event interests to internal FdWatch interests.


The documentation for this class was generated from the following file: