CARMA C++
|
Iterator for monitor point hierarchy that returns monitor points. More...
#include <carma/monitor/MonitorPointIterator.h>
Public Member Functions | |
void | checkStats (bool throwOnProblem) const |
MonitorPoint & | getMonitorPoint () const |
Get the current monitor point. More... | |
bool | hasMonitorPoint () const |
Test for monitor points in current state of iterator. More... | |
MonitorPointIterator (const MonitorContainer &rootContainer, int maxDepth=0, const std::vector< std::string > skip=std::vector< std::string >()) | |
Constructor. More... | |
bool | operator++ () |
Iterator (prefix version) More... | |
bool | operator++ (int dummy) |
Iterator (postfix version) More... | |
void | reset () |
Reset iterator back to beginning. More... | |
Iterator for monitor point hierarchy that returns monitor points.
The iterator is given a component in the tree and can return all monitor points below that component. If it is given a MonitorPoint component then it will return that monitor point. There is also a parameter (maxLevels) available to limit the number of levels to descend. This is handy if you just want to get all the monitor points in a container and not descend into sub-containers (set maxLevels=1).
Usage example: MonitorPointIterator itr(hierarchy); while(itr++) { MonitorPoint& mp = itr.getMonitorPoint(); do something with mp... }
Definition at line 51 of file MonitorPointIterator.h.
|
explicit |
Constructor.
rootContainer | MonitorContainer that is the root of the hierarchy |
maxDepth | the maximum number of levels to descend it the hierarchy. The default value of zero means go all the way down, a value of one will just get the monitor points in this container. |
skip | Subcontainers to skip (includes all children). |
carma::monitor::MonitorPoint & carma::monitor::MonitorPointIterator::getMonitorPoint | ( | ) | const |
Get the current monitor point.
Definition at line 154 of file MonitorPointIterator.h.
bool carma::monitor::MonitorPointIterator::hasMonitorPoint | ( | ) | const |
Test for monitor points in current state of iterator.
Definition at line 147 of file MonitorPointIterator.h.
bool carma::monitor::MonitorPointIterator::operator++ | ( | ) |
bool carma::monitor::MonitorPointIterator::operator++ | ( | int | dummy | ) |
Iterator (postfix version)
dummy | to distinguish postfix from prefix version |
Definition at line 140 of file MonitorPointIterator.h.
void carma::monitor::MonitorPointIterator::reset | ( | ) |
Reset iterator back to beginning.