RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::filter::OriginFilter Class Reference

This filter matches events that originate from a particular participant. More...

#include <OriginFilter.h>

Inheritance diagram for rsb::filter::OriginFilter:
Inheritance graph
Collaboration diagram for rsb::filter::OriginFilter:
Collaboration graph

Public Member Functions

 OriginFilter (const rsc::misc::UUID &origin, bool invert=false)
 Creates a new origin filter that matches event originating from origin.
rsc::misc::UUID getOrigin () const
bool isInverted () const
bool match (EventPtr e)
 Matches the given event against the constraints specified by this filter.
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.
- Public Member Functions inherited from rsb::filter::Filter
 Filter ()
virtual ~Filter ()

Private Attributes

rsc::misc::UUID origin
bool invert

Detailed Description

This filter matches events that originate from a particular participant.

Author
jmoringe

Definition at line 43 of file OriginFilter.h.

Constructor & Destructor Documentation

rsb::filter::OriginFilter::OriginFilter ( const rsc::misc::UUID &  origin,
bool  invert = false 
)

Creates a new origin filter that matches event originating from origin.

Parameters
originId of the participant from which matching events have to originate.
invertIf true, events match if they do not originate from origin.

Definition at line 37 of file OriginFilter.cpp.

Member Function Documentation

UUID rsb::filter::OriginFilter::getOrigin ( ) const

Definition at line 42 of file OriginFilter.cpp.

References origin.

bool rsb::filter::OriginFilter::isInverted ( ) const

Definition at line 46 of file OriginFilter.cpp.

References invert.

bool rsb::filter::OriginFilter::match ( EventPtr  e)
virtual

Matches the given event against the constraints specified by this filter.

Parameters
ethe event to match. Must not be changed!
Returns
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 50 of file OriginFilter.cpp.

References invert, and origin.

void rsb::filter::OriginFilter::notifyObserver ( FilterObserverPtr  fo,
FilterAction::Types  at 
)
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.

Parameters
fothe observer to notify
ataction that is performed with this filter. Just pass this to the observer

Reimplemented from rsb::filter::Filter.

Definition at line 55 of file OriginFilter.cpp.

Member Data Documentation

bool rsb::filter::OriginFilter::invert
private

Definition at line 66 of file OriginFilter.h.

Referenced by isInverted(), and match().

rsc::misc::UUID rsb::filter::OriginFilter::origin
private

Definition at line 65 of file OriginFilter.h.

Referenced by getOrigin(), and match().


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