MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ pop_event()

std::optional< Core::WindowEvent > MayaFlux::Vruta::EventSource::pop_event ( std::optional< Core::WindowEventType filter)
private

Definition at line 32 of file EventSource.cpp.

34{
35 if (m_pending_events.empty()) {
36 return std::nullopt;
37 }
38
39 if (!filter) {
40 auto event = m_pending_events.front();
41 m_pending_events.pop();
42 return event;
43 }
44
45 // TODO: Filter for specific type (need to search queue)
46 auto event = m_pending_events.front();
47 if (event.type == *filter) {
48 m_pending_events.pop();
49 return event;
50 }
51
52 return std::nullopt;
53}
std::queue< Core::WindowEvent > m_pending_events

References m_pending_events.

Referenced by MayaFlux::Kriya::EventAwaiter::await_ready(), and MayaFlux::Kriya::EventAwaiter::try_resume().

+ Here is the caller graph for this function: