Click
Loading...
Searching...
No Matches
elemfilter.hh
Go to the documentation of this file.
1// -*- c-basic-offset: 4; related-file-name: "../../lib/elemfilter.cc" -*-
2#ifndef CLICK_ELEMFILTER_HH
3#define CLICK_ELEMFILTER_HH
4#include <click/element.hh>
5CLICK_DECLS
6
7class ElementFilter { public:
8
11 }
12
14 virtual ~ElementFilter() {
15 }
16
29 virtual bool check_match(Element *e, bool isoutput, int port);
30
37 void filter(Vector<Element *> &es);
38
39};
40
41class CastElementFilter : public ElementFilter { public:
42
46 CastElementFilter(const String &name);
47
55 bool check_match(Element *e, bool isoutput, int port);
56
57 private:
58
59 String _name;
60
61};
62
63CLICK_ENDDECLS
64#endif
Cast-based filter predicate for elements.
Definition elemfilter.hh:41
bool check_match(Element *e, bool isoutput, int port)
Determine whether an element matches this filter.
Definition elemfilter.cc:70
Base class for filter predicates for elements and ports.
Definition elemfilter.hh:7
void filter(Vector< Element * > &es)
Remove all non-matching elements from es.
Definition elemfilter.cc:55
virtual ~ElementFilter()
Destroy an ElementFilter.
Definition elemfilter.hh:14
virtual bool check_match(Element *e, bool isoutput, int port)
Determine whether an element or port matches this filter.
Definition elemfilter.cc:49
ElementFilter()
Construct an ElementFilter.
Definition elemfilter.hh:10
Base class for Click elements.
Definition element.hh:42
A string of characters.
Definition string.hh:22
Vector template.
Definition vector.hh:111
Click's Element class.