casa
$Rev:20696$
|
Class to iterate through an LoggerHolder. More...
#include <LoggerHolder.h>
Public Member Functions | |
LoggerHolderIterator () | |
LoggerHolderIterator (const LoggerHolder *) | |
LoggerHolderIterator (const LoggerHolderIterator &) | |
~LoggerHolderIterator () | |
LoggerHolderIterator & | operator= (const LoggerHolderIterator &) |
void | operator++ () |
Increment to next message. | |
void | operator++ (int) |
Bool | operator!= (const LoggerHolderIterator &) |
Is the iterator not at the end yet? | |
const LogHolderIterEntry & | operator* () const |
Get the entry. | |
const LogHolderIterEntry * | operator-> () const |
const LoggerHolder & | logger () const |
Private Member Functions | |
void | next () |
Get the next entry (if available). | |
Private Attributes | |
LogHolderIter * | itsIter |
Bool | itsNotAtEnd |
Class to iterate through an LoggerHolder.
Public interface
This class makes it possible to iterate in the STL-style through all entries of an LoggerHolder object. If the logger has parent LoggerHolder objects, it first iterates through all parents (recursively) and finally through all entries in the LoggerHolder object itself.
LoggerHolder logger ("tLoggerHolder_tmp.log", True); logger.logio() << "test1" << LogIO::POST; logger.logio() << "test2" << LogIO::POST; for (LoggerHolder::const_iterator iter = logger.begin(); iter != logger.end(); iter++) { cout << iter->time() << ' ' << iter->message() << endl; }
Definition at line 495 of file LoggerHolder.h.
casa::LoggerHolderIterator::LoggerHolderIterator | ( | ) | [inline] |
Definition at line 498 of file LoggerHolder.h.
casa::LoggerHolderIterator::~LoggerHolderIterator | ( | ) | [inline] |
Definition at line 505 of file LoggerHolder.h.
References itsIter.
const LoggerHolder& casa::LoggerHolderIterator::logger | ( | ) | const [inline] |
Definition at line 530 of file LoggerHolder.h.
References itsIter, and casa::LogHolderIter::logger().
void casa::LoggerHolderIterator::next | ( | ) | [inline, private] |
Get the next entry (if available).
Definition at line 535 of file LoggerHolder.h.
References itsIter, itsNotAtEnd, and casa::LogHolderIter::next().
Referenced by operator++().
Bool casa::LoggerHolderIterator::operator!= | ( | const LoggerHolderIterator & | ) | [inline] |
Is the iterator not at the end yet?
Definition at line 519 of file LoggerHolder.h.
References itsNotAtEnd.
const LogHolderIterEntry& casa::LoggerHolderIterator::operator* | ( | ) | const [inline] |
Get the entry.
Definition at line 524 of file LoggerHolder.h.
References casa::LogHolderIter::getEntry(), and itsIter.
void casa::LoggerHolderIterator::operator++ | ( | ) | [inline] |
void casa::LoggerHolderIterator::operator++ | ( | int | ) | [inline] |
Definition at line 514 of file LoggerHolder.h.
References next().
const LogHolderIterEntry* casa::LoggerHolderIterator::operator-> | ( | ) | const [inline] |
Definition at line 526 of file LoggerHolder.h.
References casa::LogHolderIter::getEntry(), and itsIter.
LoggerHolderIterator& casa::LoggerHolderIterator::operator= | ( | const LoggerHolderIterator & | ) |
LogHolderIter* casa::LoggerHolderIterator::itsIter [private] |
Definition at line 539 of file LoggerHolder.h.
Referenced by logger(), next(), operator*(), operator->(), and ~LoggerHolderIterator().
Bool casa::LoggerHolderIterator::itsNotAtEnd [private] |
Definition at line 540 of file LoggerHolder.h.
Referenced by next(), and operator!=().