casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::LoggerHolderIterator Class Reference

Class to iterate through an LoggerHolder. More...

#include <LoggerHolder.h>

Public Member Functions

 LoggerHolderIterator ()
 
 LoggerHolderIterator (const LoggerHolder *)
 
 LoggerHolderIterator (const LoggerHolderIterator &)
 
 ~LoggerHolderIterator ()
 
LoggerHolderIteratoroperator= (const LoggerHolderIterator &)
 
void operator++ ()
 Increment to next message. More...
 
void operator++ (int)
 
Bool operator!= (const LoggerHolderIterator &)
 Is the iterator not at the end yet? More...
 
const LogHolderIterEntryoperator* () const
 Get the entry. More...
 
const LogHolderIterEntryoperator-> () const
 
const LoggerHolderlogger () const
 

Private Member Functions

void next ()
 Get the next entry (if available). More...
 

Private Attributes

LogHolderIteritsIter
 
Bool itsNotAtEnd
 

Detailed Description

Class to iterate through an LoggerHolder.

Intended use:

Public interface

Review Status

Test programs:
tLoggerHolder

Prerequisite

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;
}

Definition at line 496 of file LoggerHolder.h.

Constructor & Destructor Documentation

casacore::LoggerHolderIterator::LoggerHolderIterator ( )
inline

Definition at line 499 of file LoggerHolder.h.

casacore::LoggerHolderIterator::LoggerHolderIterator ( const LoggerHolder )
casacore::LoggerHolderIterator::LoggerHolderIterator ( const LoggerHolderIterator )
casacore::LoggerHolderIterator::~LoggerHolderIterator ( )
inline

Definition at line 506 of file LoggerHolder.h.

References itsIter.

Member Function Documentation

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

Definition at line 531 of file LoggerHolder.h.

References itsIter, and casacore::LogHolderIter::logger().

void casacore::LoggerHolderIterator::next ( void  )
inlineprivate

Get the next entry (if available).

Definition at line 536 of file LoggerHolder.h.

References itsIter, itsNotAtEnd, and casacore::LogHolderIter::next().

Referenced by operator++().

Bool casacore::LoggerHolderIterator::operator!= ( const LoggerHolderIterator )
inline

Is the iterator not at the end yet?

Definition at line 520 of file LoggerHolder.h.

References itsNotAtEnd.

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

Get the entry.

Definition at line 525 of file LoggerHolder.h.

References casacore::LogHolderIter::getEntry(), and itsIter.

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

Increment to next message.

Definition at line 513 of file LoggerHolder.h.

References next().

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

Definition at line 515 of file LoggerHolder.h.

References next().

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

Definition at line 527 of file LoggerHolder.h.

References casacore::LogHolderIter::getEntry(), and itsIter.

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

Member Data Documentation

LogHolderIter* casacore::LoggerHolderIterator::itsIter
private

Definition at line 540 of file LoggerHolder.h.

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

Bool casacore::LoggerHolderIterator::itsNotAtEnd
private

Definition at line 541 of file LoggerHolder.h.

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


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