Loading...
Searching...
No Matches
casacore::LoggerHolderIterator Class Reference
tables package (libcasa_tables) » LogTables_module

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

## Detailed Description

Class to iterate through an LoggerHolder.

### Intended use:

Public interface

### Review Status

Test programs:
  tLoggerHolder

### Prerequisite

- LoggerHolder

### Synopsis

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.

### Example

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;
}
casacore::LogIO::POST
@ POST
Post the accumulated message.
Definition LogIO.h:170
casacore::LoggerHolderIterator::logger
const LoggerHolder & logger() const
Definition LoggerHolder.h:527
casacore::LoggerHolder
Definition LoggerHolder.h:118
casacore::LoggerHolder::const_iterator
LoggerHolderIterator const_iterator
Define the STL-style iterators.
Definition LoggerHolder.h:198
casacore::True
const Bool True
Definition aipstype.h:41

Definition at line 492 of file LoggerHolder.h.

## Constructor & Destructor Documentation

## LoggerHolderIterator() [1/3]

casacore::LoggerHolderIterator::LoggerHolderIterator | ( |  | ) |

inline

Definition at line 495 of file LoggerHolder.h.

References casacore::False, itsIter, and itsNotAtEnd.

Referenced by LoggerHolderIterator(), operator!=(), and operator=().

## LoggerHolderIterator() [2/3]

casacore::LoggerHolderIterator::LoggerHolderIterator | ( | const LoggerHolder * |  | ) |

## LoggerHolderIterator() [3/3]

casacore::LoggerHolderIterator::LoggerHolderIterator | ( | const LoggerHolderIterator & |  | ) |

References LoggerHolderIterator().

## ~LoggerHolderIterator()

casacore::LoggerHolderIterator::~LoggerHolderIterator | ( |  | ) |

inline

Definition at line 502 of file LoggerHolder.h.

References itsIter.

## Member Function Documentation

## logger()

const LoggerHolder & casacore::LoggerHolderIterator::logger | ( |  | ) | const

inline

Definition at line 527 of file LoggerHolder.h.

References itsIter.

## next()

void casacore::LoggerHolderIterator::next | ( |  | ) |

inline private

Get the next entry (if available).

Definition at line 532 of file LoggerHolder.h.

References itsIter, and itsNotAtEnd.

Referenced by operator++(), and operator++().

## operator!=()

Bool casacore::LoggerHolderIterator::operator!= | ( | const LoggerHolderIterator & |  | ) |

inline

Is the iterator not at the end yet?

Definition at line 516 of file LoggerHolder.h.

References itsNotAtEnd, and LoggerHolderIterator().

## operator*()

const LogHolderIterEntry & casacore::LoggerHolderIterator::operator* | ( |  | ) | const

inline

Get the entry.

Definition at line 521 of file LoggerHolder.h.

References itsIter.

## operator++() [1/2]

void casacore::LoggerHolderIterator::operator++ | ( |  | ) |

inline

Increment to next message.

Definition at line 509 of file LoggerHolder.h.

References next().

## operator++() [2/2]

void casacore::LoggerHolderIterator::operator++ | ( | int |  | ) |

inline

Definition at line 511 of file LoggerHolder.h.

References next().

## operator->()

const LogHolderIterEntry * casacore::LoggerHolderIterator::operator-> | ( |  | ) | const

inline

Definition at line 523 of file LoggerHolder.h.

References itsIter.

## operator=()

LoggerHolderIterator & casacore::LoggerHolderIterator::operator= | ( | const LoggerHolderIterator & |  | ) |

References LoggerHolderIterator().

## Member Data Documentation

## itsIter

LogHolderIter* casacore::LoggerHolderIterator::itsIter

private

Definition at line 536 of file LoggerHolder.h.

Referenced by logger(), LoggerHolderIterator(), next(), operator*(), operator->(), and ~LoggerHolderIterator().

## itsNotAtEnd

Bool casacore::LoggerHolderIterator::itsNotAtEnd

private

Definition at line 537 of file LoggerHolder.h.

Referenced by LoggerHolderIterator(), next(), and operator!=().

The documentation for this class was generated from the following file:

- tables/LogTables/LoggerHolder.h