![]() |
NDEVR
API Documentation
|
A listener that receives and processes log messages and progress updates from an InfoPipe. More...
Public Member Functions | |
| virtual | ~LogStream () |
| Destructor. | |
| virtual void | addMessage (uint04 id, const LogMessage &message)=0 |
| Adds a single log message to this stream. | |
| virtual void | addMessages (uint04 id, const Buffer< LogMessage > &messages) |
| Adds multiple log messages to this stream at once. | |
| virtual void | addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress) |
| Registers a new progress source to be tracked by this stream. | |
| virtual void | allowCancel (bool) |
| Sets whether this stream allows the user to cancel an in-progress operation. | |
| virtual void | allowInput (bool) |
| Sets whether this stream allows user input during an operation. | |
| virtual void | attach (InfoPipe *stream) |
| Attaches this LogStream to the given InfoPipe so it receives log updates. | |
| void | clearLinks () |
| Detaches this LogStream from all linked InfoPipe objects and clears the link list. | |
| virtual void | detach (InfoPipe *stream) |
| Detaches this LogStream from the given InfoPipe, stopping further updates from it. | |
| bool | ignoringMessages () const |
| Returns whether this stream is currently ignoring messages. | |
| virtual void | removeProgressSource (uint04 idx) |
| Removes a previously registered progress source from this stream. | |
| void | setIgnoreMessages (bool ignore) |
| Sets whether this stream should ignore incoming messages. | |
| virtual void | setProgress (uint04 id, fltp04 progress)=0 |
| Updates the progress value for a tracked operation. | |
Protected Attributes | |
| bool | m_ignore_message = false |
| Whether this stream should ignore incoming messages. | |
| Buffer< InfoPipe * > | m_linked_logs |
| Collection of InfoPipe objects this stream is listening to. | |
| Dictionary< uint04, ProgressSource > | m_progress_sources |
| Maps progress source indices to their ProgressSource data. | |
A listener that receives and processes log messages and progress updates from an InfoPipe.
Definition at line 48 of file LogStream.h.
|
inlinevirtual |
Destructor.
Clears all linked InfoPipe connections before destruction.
Definition at line 54 of file LogStream.h.
References clearLinks().
|
pure virtual |
Adds a single log message to this stream.
| [in] | id | The identifier associated with the message source. |
| [in] | message | The log message to add. |
Implemented in AsciiFileOutputStream, BuildActionDefinition, ConnectionPipeStream, ConnectionStatusWidget, DebugStream, LogView, ProgressWidget, StatusBar, STDOutputStream, and TerminalDialog.
Referenced by addMessages().
|
inlinevirtual |
Adds multiple log messages to this stream at once.
| [in] | id | The identifier associated with the message source. |
| [in] | messages | The buffer of log messages to add. |
Reimplemented in AsciiFileOutputStream, and LogView.
Definition at line 119 of file LogStream.h.
References addMessage().
|
inlinevirtual |
Registers a new progress source to be tracked by this stream.
| [in] | name | The display name of the progress source. |
| [in] | idx | The unique index identifying the progress source. |
| [in] | progress | The initial progress value for this source. |
Definition at line 102 of file LogStream.h.
References m_progress_sources, and name.
|
inlinevirtual |
Sets whether this stream allows the user to cancel an in-progress operation.
| [in] | allow | Whether cancellation is allowed. |
Reimplemented in LogView, and StatusBar.
Definition at line 78 of file LogStream.h.
|
inlinevirtual |
Sets whether this stream allows user input during an operation.
| [in] | allow | Whether input is allowed. |
Definition at line 83 of file LogStream.h.
|
inlinevirtual |
Attaches this LogStream to the given InfoPipe so it receives log updates.
| [in] | stream | The InfoPipe to listen to. |
Reimplemented in LogView.
Definition at line 62 of file LogStream.h.
References m_linked_logs.
|
inlinevirtual |
Detaches this LogStream from the given InfoPipe, stopping further updates from it.
| [in] | stream | The InfoPipe to stop listening to. |
Definition at line 70 of file LogStream.h.
References m_linked_logs.
|
inline |
Returns whether this stream is currently ignoring messages.
Definition at line 147 of file LogStream.h.
References m_ignore_message.
|
inlinevirtual |
Removes a previously registered progress source from this stream.
| [in] | idx | The unique index of the progress source to remove. |
Definition at line 110 of file LogStream.h.
References m_progress_sources.
|
inline |
Sets whether this stream should ignore incoming messages.
| [in] | ignore | If true, messages will be ignored. |
Definition at line 139 of file LogStream.h.
References m_ignore_message.
Updates the progress value for a tracked operation.
| [in] | id | The identifier of the progress operation. |
| [in] | progress | The current progress value, typically in the range [0, 1]. |
Implemented in AsciiFileOutputStream, BuildActionDefinition, ConnectionPipeStream, ConnectionStatusWidget, DebugStream, LogView, ProgressWidget, StatusBar, STDOutputStream, and TerminalDialog.