24 #ifndef OMNIEVENTS__FILTER_H
25 #define OMNIEVENTS__FILTER_H
38 # include <iostream.h>
41 #ifdef HAVE_STD_IOSTREAM
58 virtual bool keep(
const CORBA::Any& event)
const =0;
60 virtual void output(ostream& os)
const =0;
71 bool keep(
const CORBA::Any& event)
const
73 CORBA::TypeCode_var tc=
event.type();
74 return( tc->kind()==_kind );
76 void output(ostream& os)
const { os<<
"\n FilterKind="<<_kind; }
89 bool keep(
const CORBA::Any& event)
const;
90 void output(ostream& os)
const { os<<
"\n FilterId="<<_rid; }
92 CORBA::RepositoryId_var
_rid;
virtual bool keep(const CORBA::Any &event) const =0
Returns TRUE if the event passes the filter and FALSE if the event should be discarded.
virtual void output(ostream &os) const =0
The most basic event filter allows only events of a certain CORBA TCKind to pass.
bool keep(const CORBA::Any &event) const
Returns TRUE if the event passes the filter and FALSE if the event should be discarded.
virtual ~FilterByTCKind()
FilterByTCKind(CORBA::TCKind kind)
void output(ostream &os) const
Allows only events of a certain CORBA RepositoryId to pass.
void output(ostream &os) const
FilterByRepositoryId(const char *rid)
CORBA::RepositoryId_var _rid
virtual ~FilterByRepositoryId()