RSB
0.16.1
|
This filter matches events based on the value of their method field. More...
#include <MethodFilter.h>
Public Member Functions | |
MethodFilter (const std::string &method, bool invert=false) | |
Creates a new method filter that matches events whose method fields have the value method. More... | |
const std::string & | getMethod () const |
bool | isInverted () const |
bool | match (EventPtr event) |
Matches the given event against the constraints specified by this filter. More... | |
void | notifyObserver (FilterObserverPtr observer, FilterAction::Types action) |
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 | |
std::string | method |
bool | invert |
This filter matches events based on the value of their method field.
Definition at line 42 of file MethodFilter.h.
rsb::filter::MethodFilter::MethodFilter | ( | const std::string & | method, |
bool | invert = false |
||
) |
Creates a new method filter that matches events whose method fields have the value method.
method | String value that the method field of matched events has to have. |
invert | If true, events match if their method fields do not match method. |
Definition at line 34 of file MethodFilter.cpp.
const std::string & rsb::filter::MethodFilter::getMethod | ( | ) | const |
Definition at line 39 of file MethodFilter.cpp.
References method.
bool rsb::filter::MethodFilter::isInverted | ( | ) | const |
Definition at line 43 of file MethodFilter.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 47 of file MethodFilter.cpp.
|
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 52 of file MethodFilter.cpp.
|
private |
Definition at line 66 of file MethodFilter.h.
Referenced by isInverted(), and match().
|
private |
Definition at line 65 of file MethodFilter.h.
Referenced by getMethod(), and match().