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