WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::EventLoop Class Reference

A declarative way to bind a set of actions to a loop and execute them when the loop is polled. More...

#include <wpi/event/EventLoop.hpp>

Public Member Functions

 EventLoop ()
 EventLoop (const EventLoop &)=delete
EventLoopoperator= (const EventLoop &)=delete
void Bind (wpi::util::unique_function< void()> action)
 Bind a new action to run when the loop is polled.
void Poll ()
 Poll all bindings.
void Clear ()
 Clear all bindings.

Detailed Description

A declarative way to bind a set of actions to a loop and execute them when the loop is polled.

Constructor & Destructor Documentation

◆ EventLoop() [1/2]

wpi::EventLoop::EventLoop ( )

◆ EventLoop() [2/2]

wpi::EventLoop::EventLoop ( const EventLoop & )
delete

Member Function Documentation

◆ Bind()

void wpi::EventLoop::Bind ( wpi::util::unique_function< void()> action)

Bind a new action to run when the loop is polled.

Parameters
actionthe action to run.

◆ Clear()

void wpi::EventLoop::Clear ( )

Clear all bindings.

◆ operator=()

EventLoop & wpi::EventLoop::operator= ( const EventLoop & )
delete

◆ Poll()

void wpi::EventLoop::Poll ( )

Poll all bindings.


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