MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Vruta::EventSource Class Referenceabstract

Abstract base for all awaitable signal sources. More...

#include <EventSource.hpp>

+ Inheritance diagram for MayaFlux::Vruta::EventSource:
+ Collaboration diagram for MayaFlux::Vruta::EventSource:

Public Member Functions

virtual void clear ()=0
 Discards all buffered signals.
 
 EventSource ()=default
 
 EventSource (const EventSource &)=delete
 
 EventSource (EventSource &&) noexcept=default
 
virtual bool has_pending () const =0
 Returns true if any signals are buffered and not yet consumed.
 
EventSourceoperator= (const EventSource &)=delete
 
EventSourceoperator= (EventSource &&) noexcept=default
 
virtual ~EventSource ()=default
 

Protected Member Functions

void dispatch (const void *event)
 Iterates the waiter list, passing the type-erased signal to each.
 
void register_waiter (Kriya::EventAwaiter *awaiter)
 
void unregister_waiter (Kriya::EventAwaiter *awaiter)
 

Private Attributes

std::vector< Kriya::EventAwaiter * > m_waiters
 

Friends

class Kriya::EventAwaiter
 

Detailed Description

Abstract base for all awaitable signal sources.

Manages the waiter list and dispatches to registered awaiters via the type-erased EventAwaiter interface. Has no knowledge of payload type, filter semantics, or threading model.

Derived classes call dispatch() with a type-erased pointer to the current signal value. Each registered awaiter receives the pointer and decides independently whether to resume.

See also
WindowEventSource
SignalSource

Definition at line 28 of file EventSource.hpp.


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