Base class for router configuration visitors that collect elements.
More...
#include <routervisitor.hh>
Base class for router configuration visitors that collect elements.
ElementTracker is a type of RouterVisitor used to traverse the router configuration graph and collect matching elements. A subclass's visit() function will call insert() to store elements that match. ElementTracker objects are usually passed to the Router::visit_downstream() and Router::visit_upstream() functions.
◆ const_iterator
◆ ElementTracker()
| ElementTracker::ElementTracker |
( |
Router * |
router | ) |
|
Construct an ElementTracker.
- Parameters
-
| router | the router to be traversed |
◆ elements()
Return the elements that matched.
◆ size()
| int ElementTracker::size |
( |
| ) |
const |
|
inline |
Return the number of matching elements.
◆ operator[]()
| Element * ElementTracker::operator[] |
( |
int |
i | ) |
const |
|
inline |
Return the i'th matching element.
Elements are ordered by their time of first insertion.
◆ begin()
Return an iterator for the first matching element.
◆ end()
Return an iterator for the end of the container.
◆ contains()
| bool ElementTracker::contains |
( |
const Element * |
e | ) |
const |
|
inline |
Return true iff element e is a matching element.
◆ insert()
| void ElementTracker::insert |
( |
Element * |
e | ) |
|
|
inline |
Add element e to the set of matching elements.
◆ clear()
| void ElementTracker::clear |
( |
| ) |
|
|
inline |
Clear the set of matching elements.
The documentation for this class was generated from the following files: