casacore
|
#include <MemoryLogSink.h>
Public Member Functions | |
MemoryLogSink () | |
Create an empty sink without a filter. More... | |
MemoryLogSink (LogMessage::Priority filter) | |
Create an empty sink with the given filter. More... | |
MemoryLogSink (const LogFilterInterface &filter) | |
MemoryLogSink (const MemoryLogSink &other) | |
Copy constructor (copy semantics). More... | |
MemoryLogSink & | operator= (const MemoryLogSink &other) |
Assignment (copy semantics). More... | |
virtual | ~MemoryLogSink () |
virtual uInt | nelements () const |
Get number of messages in sink. More... | |
virtual Double | getTime (uInt i) const |
Get given part of the i-th message from the sink. More... | |
virtual String | getPriority (uInt i) const |
virtual String | getMessage (uInt i) const |
virtual String | getLocation (uInt i) const |
virtual String | getObjectID (uInt i) const |
virtual Bool | postLocally (const LogMessage &message) |
If the message passes the filter, write it to memory. More... | |
virtual void | writeLocally (Double time, const String &message, const String &priority, const String &location, const String &objectID) |
Write a message (usually from another logsink) into the local one. More... | |
virtual void | clearLocally () |
Clear the local sink (i.e. More... | |
String | id () const |
Returns the id of the LogSink in use... More... | |
Public Member Functions inherited from casacore::LogSinkInterface | |
LogSinkInterface () | |
Create with a NORMAL filter. More... | |
LogSinkInterface (const LogFilterInterface &filter) | |
Create with the supplied filter . More... | |
LogSinkInterface (const LogSinkInterface &other) | |
Copy semantics - copy the filter from other to this More... | |
LogSinkInterface & | operator= (const LogSinkInterface &) |
virtual | ~LogSinkInterface () |
virtual const LogFilterInterface & | filter () const |
Get/set the filter. More... | |
virtual LogSinkInterface & | filter (const LogFilterInterface &filter) |
virtual void | flush (Bool global=True) |
Write any pending output. More... | |
virtual void | cerrToo (bool cerr2) |
Write to cerr too. More... | |
void | setTaskName (const String &theTask) |
Static Public Member Functions | |
static String | localId () |
Returns the id for this class... More... | |
Static Public Member Functions inherited from casacore::LogSinkInterface | |
static String | localId () |
Returns the id for this class... More... | |
Private Member Functions | |
void | copy_other (const MemoryLogSink &other) |
Avoid duplicating code in copy ctor and assignment operator. More... | |
void | resize (uInt nrnew) |
Rezize the blocks to the given size, but at least 64 elements more than the current size. More... | |
Private Attributes | |
uInt | nmsg_p |
Block< Double > | time_p |
Block< String > | priority_p |
Block< String > | message_p |
Block< String > | location_p |
Block< String > | objectID_p |
Additional Inherited Members | |
Protected Attributes inherited from casacore::LogSinkInterface | |
String | taskName |
Save log messages in memory.
Public interface
This class posts messages which pass the filter to memory.
See (see (file="Logging.h"))Logging.h.
For temporary images log messages must be held in memory temporarily.
Definition at line 71 of file MemoryLogSink.h.
casacore::MemoryLogSink::MemoryLogSink | ( | ) |
Create an empty sink without a filter.
|
explicit |
Create an empty sink with the given filter.
|
explicit |
casacore::MemoryLogSink::MemoryLogSink | ( | const MemoryLogSink & | other | ) |
Copy constructor (copy semantics).
|
virtual |
|
virtual |
Clear the local sink (i.e.
remove all messages from it).
Reimplemented from casacore::LogSinkInterface.
|
private |
Avoid duplicating code in copy ctor and assignment operator.
Reimplemented from casacore::LogSinkInterface.
Reimplemented from casacore::LogSinkInterface.
Reimplemented from casacore::LogSinkInterface.
Reimplemented from casacore::LogSinkInterface.
Get given part of the i-th message from the sink.
Reimplemented from casacore::LogSinkInterface.
|
virtual |
Returns the id of the LogSink in use...
Implements casacore::LogSinkInterface.
|
static |
Returns the id for this class...
|
virtual |
Get number of messages in sink.
Reimplemented from casacore::LogSinkInterface.
MemoryLogSink& casacore::MemoryLogSink::operator= | ( | const MemoryLogSink & | other | ) |
Assignment (copy semantics).
|
virtual |
If the message passes the filter, write it to memory.
Implements casacore::LogSinkInterface.
|
private |
Rezize the blocks to the given size, but at least 64 elements more than the current size.
|
virtual |
Write a message (usually from another logsink) into the local one.
Reimplemented from casacore::LogSinkInterface.
Definition at line 131 of file MemoryLogSink.h.
Definition at line 130 of file MemoryLogSink.h.
|
private |
Definition at line 127 of file MemoryLogSink.h.
Definition at line 132 of file MemoryLogSink.h.
Definition at line 129 of file MemoryLogSink.h.
Definition at line 128 of file MemoryLogSink.h.