Ocular Engine
Ocular::Core::EventSnooper Class Reference

#include <EventSnooper.hpp>

Inheritance diagram for Ocular::Core::EventSnooper:
Ocular::Core::AEventListener

Public Member Functions

void setIgnoreDuplicates (bool ignore)
 
void setIgnorePriorityLevel (Priority priority, bool ignore)
 

Protected Member Functions

virtual bool onEvent (std::shared_ptr< AEvent > event)
 

Detailed Description

Logs all events that are generated.
Has the following customization options:

  • Ignore specified priority levels
  • Ignore duplicate event types


By default, no events are ignored.

Member Function Documentation

bool Ocular::Core::EventSnooper::onEvent ( std::shared_ptr< AEvent event)
protectedvirtual
Returns
TRUE to keep processing this event after this listener, FALSE to consume this event

Implements Ocular::Core::AEventListener.

void Ocular::Core::EventSnooper::setIgnoreDuplicates ( bool  ignore)
Parameters
ignoreIf set to TRUE, the snooper will ignore any duplicate events that come in simultaneously.
void Ocular::Core::EventSnooper::setIgnorePriorityLevel ( Priority  priority,
bool  ignore 
)
Parameters
priorityPriority level to ignore
ignoreIf set to TRUE, the snooper will ignore the specified priority level.
If FALSE, it will stop ignoring the priority level.

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