casa
$Rev:20696$
|
Save log messages in memory. More...
#include <MemoryLogSink.h>
Public Member Functions | |
MemoryLogSink () | |
Create an empty sink without a filter. | |
MemoryLogSink (LogMessage::Priority filter) | |
Create an empty sink with the given filter. | |
MemoryLogSink (const LogFilterInterface &filter) | |
MemoryLogSink (const MemoryLogSink &other) | |
Copy constructor (copy semantics). | |
MemoryLogSink & | operator= (const MemoryLogSink &other) |
Assignment (copy semantics). | |
virtual | ~MemoryLogSink () |
virtual uInt | nelements () const |
Get number of messages in sink. | |
virtual Double | getTime (uInt i) const |
Get given part of the i-th message from the sink. | |
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. | |
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. | |
virtual void | clearLocally () |
Clear the local sink (i.e. | |
String | id () const |
Returns the id of the LogSink in use... | |
Static Public Member Functions | |
static String | localId () |
Returns the id for this class... | |
Private Member Functions | |
void | copy_other (const MemoryLogSink &other) |
Avoid duplicating code in copy ctor and assignment operator. | |
void | resize (uInt nrnew) |
Rezize the blocks to the given size, but at least 64 elements more than the current size. | |
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 |
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.
Create an empty sink without a filter.
casa::MemoryLogSink::MemoryLogSink | ( | LogMessage::Priority | filter | ) | [explicit] |
Create an empty sink with the given filter.
casa::MemoryLogSink::MemoryLogSink | ( | const LogFilterInterface & | filter | ) | [explicit] |
casa::MemoryLogSink::MemoryLogSink | ( | const MemoryLogSink & | other | ) |
Copy constructor (copy semantics).
virtual casa::MemoryLogSink::~MemoryLogSink | ( | ) | [virtual] |
virtual void casa::MemoryLogSink::clearLocally | ( | ) | [virtual] |
void casa::MemoryLogSink::copy_other | ( | const MemoryLogSink & | other | ) | [private] |
Avoid duplicating code in copy ctor and assignment operator.
virtual String casa::MemoryLogSink::getLocation | ( | uInt | i | ) | const [virtual] |
Reimplemented from casa::LogSinkInterface.
virtual String casa::MemoryLogSink::getMessage | ( | uInt | i | ) | const [virtual] |
Reimplemented from casa::LogSinkInterface.
virtual String casa::MemoryLogSink::getObjectID | ( | uInt | i | ) | const [virtual] |
Reimplemented from casa::LogSinkInterface.
virtual String casa::MemoryLogSink::getPriority | ( | uInt | i | ) | const [virtual] |
Reimplemented from casa::LogSinkInterface.
virtual Double casa::MemoryLogSink::getTime | ( | uInt | i | ) | const [virtual] |
Get given part of the i-th message from the sink.
Reimplemented from casa::LogSinkInterface.
String casa::MemoryLogSink::id | ( | ) | const [virtual] |
Returns the id of the LogSink in use...
Implements casa::LogSinkInterface.
static String casa::MemoryLogSink::localId | ( | ) | [static] |
Returns the id for this class...
Reimplemented from casa::LogSinkInterface.
virtual uInt casa::MemoryLogSink::nelements | ( | ) | const [virtual] |
Get number of messages in sink.
Reimplemented from casa::LogSinkInterface.
MemoryLogSink& casa::MemoryLogSink::operator= | ( | const MemoryLogSink & | other | ) |
Assignment (copy semantics).
virtual Bool casa::MemoryLogSink::postLocally | ( | const LogMessage & | message | ) | [virtual] |
If the message passes the filter, write it to memory.
Implements casa::LogSinkInterface.
void casa::MemoryLogSink::resize | ( | uInt | nrnew | ) | [private] |
Rezize the blocks to the given size, but at least 64 elements more than the current size.
virtual void casa::MemoryLogSink::writeLocally | ( | Double | time, |
const String & | message, | ||
const String & | priority, | ||
const String & | location, | ||
const String & | objectID | ||
) | [virtual] |
Write a message (usually from another logsink) into the local one.
Reimplemented from casa::LogSinkInterface.
Block<String> casa::MemoryLogSink::location_p [private] |
Definition at line 131 of file MemoryLogSink.h.
Block<String> casa::MemoryLogSink::message_p [private] |
Definition at line 130 of file MemoryLogSink.h.
uInt casa::MemoryLogSink::nmsg_p [private] |
Definition at line 127 of file MemoryLogSink.h.
Block<String> casa::MemoryLogSink::objectID_p [private] |
Definition at line 132 of file MemoryLogSink.h.
Block<String> casa::MemoryLogSink::priority_p [private] |
Definition at line 129 of file MemoryLogSink.h.
Block<Double> casa::MemoryLogSink::time_p [private] |
Definition at line 128 of file MemoryLogSink.h.