RSB
0.19.0
|
This filter matches events in which a particular cause is present. More...
#include <CauseFilter.h>
Public Member Functions | |
CauseFilter (const rsc::misc::UUID &cause, bool invert=false) | |
Creates a new cause filter that matches event in whose cause vector cause is present. More... | |
CauseFilter (const EventId &cause, bool invert=false) | |
Creates a new cause filter that matches event in whose cause vector cause is present. More... | |
rsc::misc::UUID | getCause () const |
Return the cause that has to be present in events matched by this filter. More... | |
bool | isInverted () const |
Indicates whether the filter is inverted. More... | |
bool | match (EventPtr e) |
Matches the given event against the constraints specified by this filter. More... | |
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. More... | |
Public Member Functions inherited from rsb::filter::Filter | |
Filter () | |
virtual | ~Filter () |
Private Attributes | |
EventIdPtr | causeAsEventId |
rsc::misc::UUID | causeAsUUID |
bool | invert |
This filter matches events in which a particular cause is present.
Definition at line 45 of file CauseFilter.h.
rsb::filter::CauseFilter::CauseFilter | ( | const rsc::misc::UUID & | cause, |
bool | invert = false |
||
) |
Creates a new cause filter that matches event in whose cause vector cause is present.
cause | The cause that has to be present in events matching the filter. |
invert | If true, events match if cause is not present in their cause vector. |
rsb::filter::CauseFilter::CauseFilter | ( | const EventId & | cause, |
bool | invert = false |
||
) |
Creates a new cause filter that matches event in whose cause vector cause is present.
cause | The cause that has to be present in events matching the filter. |
invert | If true, events match if cause is not present in their cause vector. |
Definition at line 41 of file CauseFilter.cpp.
UUID rsb::filter::CauseFilter::getCause | ( | ) | const |
Return the cause that has to be present in events matched by this filter.
Definition at line 46 of file CauseFilter.cpp.
References causeAsEventId, and causeAsUUID.
bool rsb::filter::CauseFilter::isInverted | ( | ) | const |
Indicates whether the filter is inverted.
true
if the filter is inverted. Definition at line 54 of file CauseFilter.cpp.
References invert.
|
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. Implements rsb::filter::Filter.
Definition at line 58 of file CauseFilter.cpp.
References causeAsEventId, causeAsUUID, and invert.
|
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 from rsb::filter::Filter.
Definition at line 75 of file CauseFilter.cpp.
|
private |
Definition at line 91 of file CauseFilter.h.
Referenced by getCause(), and match().
|
private |
Definition at line 92 of file CauseFilter.h.
Referenced by getCause(), and match().
|
private |
Definition at line 93 of file CauseFilter.h.
Referenced by isInverted(), and match().