casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::LoggerHolderIterator Class Reference

Class to iterate through an LoggerHolder. More...

#include <LoggerHolder.h>

List of all members.

Public Member Functions

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

Private Member Functions

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

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 495 of file LoggerHolder.h.


Constructor & Destructor Documentation

Definition at line 498 of file LoggerHolder.h.

Definition at line 505 of file LoggerHolder.h.

References itsIter.


Member Function Documentation

   

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]

Increment to next message.

Definition at line 512 of file LoggerHolder.h.

References next().

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 )

Member Data Documentation

Definition at line 539 of file LoggerHolder.h.

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

Definition at line 540 of file LoggerHolder.h.

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


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