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