Go to the documentation of this file.
29 #ifndef TABLES_LOGGERHOLDER_H
30 #define TABLES_LOGGERHOLDER_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Logging/LogIO.h>
35 #include <casacore/casa/Containers/Block.h>
36 #include <casacore/casa/Utilities/CountedPtr.h>
41 class LoggerHolderRep;
42 class LoggerHolderIterator;
552 return itsRep->isTempClosed();
const LoggerHolder * itsLogger
void append(const LoggerHolder &other)
Append the entries of the other logger to this one.
virtual Double getTime(uInt i) const
Get given part of the i-th message from the local sink.
const Block< LoggerHolder > & parents() const
Return the block of parents.
void addParent(const LoggerHolder &)
Add a logger from a parent.
void addParent(const LoggerHolder &)
Add a logger from a parent.
const_iterator begin() const
Get the begin and end iterator object.
const LogHolderIterEntry & operator*() const
Get the entry.
LoggerHolderIterator & operator=(const LoggerHolderIterator &)
Referenced counted pointer for constant data.
void unlock()
Unlock the log table.
const Block< LoggerHolder > & parents() const
Return the block of parents.
LoggerHolderRep(Bool nullSink)
Create with a NullSink or MemoryLogSink (default).
LogSink & sink()
Get access to the log sink (reopen the log table if needed).
LogIO & logio()
Get access to the logger.
Class to iterate through an LoggerHolder.
void resync()
Resync the log table (if needed).
Bool isTempClosed() const
Is the log table temporarily closed?
LoggerHolderIterator const_iterator
Define the STL-style iterators.
CountedPtr< LoggerHolderRep > itsRep
void unlock()
Unlock the log table.
void removeParents()
Remove all parents.
void reopenRW()
Reopen a readonly logtable for read/write (if needed).
LoggerHolderRep & operator=(const LoggerHolderRep &)
Assignment.
virtual String getMessage(uInt i) const
void operator++()
Increment to next message.
void resync()
Resync the log table (if needed).
void flush()
Flush the log table.
LoggerHolderIterator const_iterator
Define the STL-style iterators.
Bool next()
Increment to next message.
ostream-like interface to creating log messages.
void append(const LoggerHolder &other)
Append the entries of the other logger to this one.
void reopenRW()
Reopen a readonly logtable for read/write (if needed).
LogIO & logio()
Get access to the logger.
void tempClose(Bool closeParents=True)
Temporarily close all log tables.
const LoggerHolder & logger() const
virtual String getPriority(uInt i) const
LogHolderIterEntry(const LogSink *sink, uInt index)
Double time() const
Get the message parts.
Save log messages in a Casacore Table.
Distribute LogMessages to their destination(s)
LogHolderIterEntry(const LogHolderIterEntry &that)
TableLogSink * itsTablePtr
LogHolderIter * itsParentIter
void flush()
Flush the log table.
void next()
Get the next entry (if available).
const LogHolderIterEntry & getEntry() const
Get the entry.
LogHolderIterEntry itsEntry
void clear()
Clear the log.
void doReopen()
Do the actual reopen.
this file contains all the compiler specific defines
const LoggerHolder & logger() const
virtual String getObjectID(uInt i) const
Bool isTempClosed() const
Is the log table temporarily closed?
const_iterator begin() const
Get the begin and end iterator object.
Bool operator!=(const LoggerHolderIterator &)
Is the iterator not at the end yet?
Representation of the class holding a hierarchy of loggers.
const_iterator end() const
void clear()
Clear the log.
void reopen()
Reopen the log table if needed (after a tempClose).
LoggerHolder(Bool nullSink=False)
Create with a NullSink or MemoryLogSink (default).
void removeParents()
Remove all parents.
const_iterator end() const
const LogHolderIterEntry * operator->() const
String: the storage and methods of handling collections of characters.
void tempClose(Bool closeParents=True) const
Temporarily close all log tables.
bool Bool
Define the standard types used by Casacore.
Class holding a hierarchy of loggers.
LogSink & sink()
Get access to the log sink (reopen the log table if needed).
Block< LoggerHolder > itsParents
LogHolderIter & operator=(const LogHolderIter &)
Assignment is not needed, thus forbidden.
LoggerHolder & operator=(const LoggerHolder &)
Assignment (reference semantics).
LogHolderIterEntry & operator=(const LogHolderIterEntry &that)
LogHolderIter(const LoggerHolder *)
Construct the iterator on the given LoggerHolderRep.
virtual String getLocation(uInt i) const
Class representing an entry in a LoggerHolder.
void reopen()
Reopen the log table if needed (after a tempClose).
Class doing the actual iteration through an LoggerHolder.