MCPcopy Create free account
hub / github.com/audacity/audacity / FilterEvent

Method FilterEvent

src/JournalEvents.cpp:392–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390 }
391
392 int FilterEvent( wxEvent &event ) override
393 {
394 if (!IsWatching())
395 // Previously encountered error stopped recording of any more events
396 return Event_Skip;
397
398 static const auto &catalog = Events::ByType();
399 const auto type = event.GetEventType();
400 if (const auto iter = catalog.find(type); iter != catalog.end()) {
401 // Try to write a representation to the journal
402 const auto &info = iter->second;
403 auto pStrings = info.serializer(event);
404 if (!pStrings)
405 return Event_Skip;
406 else {
407 pStrings->insert(pStrings->begin(), info.code.GET());
408 Journal::Output(*pStrings);
409 }
410 }
411 else
412 // Just ignore this un-catalogued event type
413 ;
414
415 return Event_Skip;
416 }
417};
418
419}

Callers

nothing calls this directly

Calls 6

IsWatchingFunction · 0.85
OutputFunction · 0.85
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected