RSB
0.7.0
|
A filter filters an event stream by removing unwanted events. More...
#include <Filter.h>
Public Member Functions | |
Filter () | |
virtual | ~Filter () |
virtual bool | match (EventPtr e)=0 |
Matches the given event against the constraints specified by this filter. | |
virtual void | notifyObserver (FilterObserverPtr fo, FilterAction::Types at) |
Double-dispatch method to notfify a FilterObserver about changes for this filter with a more specific type that the general Filter interface. |
A filter filters an event stream by removing unwanted events.
Therefore it has a function to match an event against its restrictions.
As some there may be optimization possible for certain specific filter types, a double-dispatch logic is available using FilterObserver. Instances must implement this notifyObserver if they are relevant for FilterObserver instances.
rsb::filter::Filter::Filter | ( | ) |
Definition at line 33 of file Filter.cpp.
|
virtual |
Definition at line 36 of file Filter.cpp.
|
pure virtual |
Matches the given event against the constraints specified by this filter.
e | the event to match. Must not be changed! |
true
if the event matches the restrictions specified by this filter and hence can be delivered to the client, false
to remove the event from the stream. Implemented in rsb::filter::OriginFilter, and rsb::filter::ScopeFilter.
|
virtual |
Double-dispatch method to notfify a FilterObserver about changes for this filter with a more specific type that the general Filter interface.
The default implementation does not generate a specific notification on FilterObserver. Override this method if there is a specific reception method in FilterObserver.
fo | the observer to notify |
at | action that is performed with this filter. Just pass this to the observer |
Reimplemented in rsb::filter::OriginFilter, and rsb::filter::ScopeFilter.
Definition at line 39 of file Filter.cpp.