MemoryLogSink.h
Classes
- MemoryLogSink -- Save log messages in memory. (full description)
Interface
- Public Members
- MemoryLogSink()
- explicit MemoryLogSink (LogMessage::Priority filter)
- explicit MemoryLogSink (const LogFilterInterface& filter)
- MemoryLogSink (const MemoryLogSink& other)
- MemoryLogSink& operator= (const MemoryLogSink& other)
- virtual ~MemoryLogSink()
- virtual uInt nelements() const
- virtual Double getTime (uInt i) const
- 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)
- virtual void writeLocally (Double time, const String& message, const String& priority, const String& location, const String& objectID)
- virtual void clearLocally()
- static String localId( )
- String id( ) const
- Private Members
- void copy_other (const MemoryLogSink& other)
- void resize (uInt nrnew)
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
- Programs:
- Demos:
- Tests:
Prerequisite
Synopsis
This class posts messages which pass the filter to
memory.
Example
See Logging.h.
Motivation
For temporary images log messages must be held in memory temporarily.
Member Description
Create an empty sink without a filter.
explicit MemoryLogSink (LogMessage::Priority filter)
explicit MemoryLogSink (const LogFilterInterface& filter)
Create an empty sink with the given filter.
MemoryLogSink (const MemoryLogSink& other)
Copy constructor (copy semantics).
MemoryLogSink& operator= (const MemoryLogSink& other)
Assignment (copy semantics).
virtual uInt nelements() const
Get number of messages in sink.
Get given part of the i-th message from the sink.
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.
Clear the local sink (i.e. remove all messages from it).
Returns the id for this class...
Returns the id of the LogSink in use...
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.