![]() |
NDEVR
API Documentation
|
Serves as the primary program interface for processes to report issues and allows any number of LogStreams to subscribe and receive the log information in real-time. More...
Public Member Functions | |
| Log (const Log &log) | |
| Copy constructs a Log from another Log. | |
| Log (uint08 id=0) | |
| Constructs a Log with the given identifier. | |
| virtual | ~Log () |
| Destructor. | |
| void | addInput (const StringView &s) final override |
| Provides input text, automatically resolving the input guard index. | |
| void | addInput (const StringView &s, uint04 idx) final override |
| Provides input text for a specific input guard by index. | |
| void | addMessage (uint04 id, const LogMessage &message) final override |
| Adds a single LogMessage to the log and notifies all subscribed streams. | |
| void | addMessage (uint04 id, const StringView &message, uint01 log_level=10) final override |
| Adds a message from a string view with a specified log level. | |
| void | addMessage (uint04 id, const TranslatedString &message, uint01 log_level=10) final override |
| Adds a translated message with a specified log level. | |
| void | addMessages (uint04 id, const Buffer< LogMessage > &messages) final override |
| Adds multiple LogMessages to the log and notifies all subscribed streams. | |
| void | addStream (LogStream *stream, bool add_all) final override |
| Subscribes a LogStream to receive log messages. | |
| void | concatenate (const Log &log) |
| Appends all messages from another Log into this one. | |
| void | insertMessages (uint04 index, const Buffer< LogMessage > &messages) |
| Inserts multiple LogMessages at a specific index in the log buffer. | |
| fltp04 | progressIdx (uint04 idx) const final override |
| Retrieves the current progress percentage for a tracked progress source. | |
| void | removeStream (LogStream *stream) final override |
| Unsubscribes a LogStream so it no longer receives log messages. | |
| void | setProgressIdx (uint04 idx, fltp04 percent) final override |
| Sets the progress percentage for a tracked progress source. | |
| void | sortMessagesByPriority () |
| Sorts all stored messages by their priority level. | |
| void | sortMessagesByTime () |
| Sorts all stored messages by their timestamp. | |
| Public Member Functions inherited from Buffer< LogMessage > | |
| constexpr | Buffer () noexcept |
| Creates an empty buffer. | |
| ~Buffer () | |
| void | add (LogMessage &&object) |
| Adds object to the end of the buffer. | |
| void | addSpace (t_index_type space_to_add) |
| Adds a space to the end of the buffer. | |
| operator decltype | auto () const |
| Gets the first location of type* in the array. | |
| sint04 | compare (const Buffer &value) const |
| Compares this Buffer to another to determine their relative ordering. | |
| Buffer< t_other_type, t_other_memory_manager > | getAs () const |
| Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer. | |
| void | insert (t_index_type location, const LogMessage &object) |
| Adds an object to a specific location. | |
| void | removeAllOrdered (const LogMessage &object) |
| Removes all instances of the object. | |
| void | removeAllOrderedFn (const t_functor &functor) |
| Removes all items based on the functor. | |
| void | removeAllUnordered (const LogMessage &object) |
| Removes all unordered described by object. | |
Protected Attributes | |
| Dictionary< uint04, String > | m_input |
| Maps input guard indices to their stored input strings. | |
| Dictionary< uint04, ProgressSource > | m_progress |
| Maps progress source indices to their progress tracking data. | |
| Dictionary< uint04, bool > | m_request_cancel |
| Maps cancel guard indices to their cancellation request state. | |
Private Member Functions | |
| uint04 | addCancelGuard (const TranslatedString &name) final override |
| Registers a new cancel guard with a display name. | |
| virtual void | addCancelGuard (const TranslatedString &name, uint04 idx) final override |
| Registers a new cancel guard at a specific index with a display name. | |
| uint04 | addInputGuard (const TranslatedString &name) final override |
| Registers a new input guard with a display name, returning the assigned index. | |
| void | addInputGuard (const TranslatedString &name, uint04 idx) final override |
| Registers a new input guard at a specific index with a display name. | |
| uint04 | addProgressSource (const TranslatedString &name, fltp04 progress) final override |
| Registers a new progress source with a display name and initial progress. | |
| virtual void | addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress) final override |
| Registers a new progress source at a specific index with a display name and initial progress. | |
| bool | cancelRequested () const final override |
| Checks whether any cancel has been requested across all guards. | |
| bool | cancelRequestedIdx (uint04 idx) const final override |
| Checks whether cancel has been requested for a specific guard. | |
| void | clearInputIdx (uint04 idx) final override |
| Clears the stored input for a specific input guard. | |
| void | getInputIdx (String &s, uint04 idx, bool clear) final override |
| Retrieves the input string for a specific input guard. | |
| void | removeCancelGuard (uint04 idx) final override |
| Removes a previously registered cancel guard. | |
| void | removeInputGuard (uint04 idx) final override |
| Removes a previously registered input guard. | |
| void | removeProgressSource (uint04 idx) final override |
| Removes a previously registered progress source. | |
| void | requestCancel () final override |
| Requests cancellation of all active operations. | |
| void | requestCancel (uint04) final override |
| Requests cancellation of a specific operation by index. | |
Serves as the primary program interface for processes to report issues and allows any number of LogStreams to subscribe and receive the log information in real-time.
|
explicit |
Constructs a Log with the given identifier.
| [in] | id | The unique identifier for this log instance. |
Referenced by Log(), and concatenate().
| Log::Log | ( | const Log & | log | ) |
|
virtual |
Destructor.
Cleans up log resources and detaches streams.
|
finaloverrideprivatevirtual |
Registers a new cancel guard with a display name.
| [in] | name | The display name for the cancellable operation. |
Implements InfoPipe.
References addCancelGuard().
Referenced by addCancelGuard(), and addCancelGuard().
|
finaloverrideprivatevirtual |
Registers a new cancel guard at a specific index with a display name.
| [in] | name | The display name for the cancellable operation. |
| [in] | idx | The index to assign to the cancel guard. |
Implements InfoPipe.
References addCancelGuard().
|
finaloverridevirtual |
Provides input text, automatically resolving the input guard index.
| [in] | s | The input string to supply. |
Implements InfoPipe.
References addInput().
|
finaloverridevirtual |
Provides input text for a specific input guard by index.
| [in] | s | The input string to supply. |
| [in] | idx | The index of the input guard. |
Implements InfoPipe.
References addInput().
Referenced by addInput(), and addInput().
|
finaloverrideprivatevirtual |
Registers a new input guard with a display name, returning the assigned index.
| [in] | name | The display name for the input request. |
Implements InfoPipe.
References addInputGuard().
Referenced by addInputGuard(), and addInputGuard().
|
finaloverrideprivatevirtual |
Registers a new input guard at a specific index with a display name.
| [in] | name | The display name for the input request. |
| [in] | idx | The index to assign to the input guard. |
Implements InfoPipe.
References addInputGuard().
|
finaloverridevirtual |
Adds a single LogMessage to the log and notifies all subscribed streams.
| [in] | id | The source identifier for the message. |
| [in] | message | The LogMessage to add. |
Implements InfoPipe.
Referenced by addMessage().
|
finaloverridevirtual |
Adds a message from a string view with a specified log level.
| [in] | id | The source identifier for the message. |
| [in] | message | The message text. |
| [in] | log_level | The severity level of the message. |
Implements InfoPipe.
|
finaloverridevirtual |
Adds a translated message with a specified log level.
| [in] | id | The source identifier for the message. |
| [in] | message | The translated message text. |
| [in] | log_level | The severity level of the message. |
Implements InfoPipe.
References addMessage().
|
finaloverride |
Adds multiple LogMessages to the log and notifies all subscribed streams.
| [in] | id | The source identifier for the messages. |
| [in] | messages | The buffer of LogMessages to add. |
References Buffer< LogMessage >::Buffer(), and addMessages().
Referenced by addMessages().
|
finaloverrideprivatevirtual |
Registers a new progress source with a display name and initial progress.
| [in] | name | The display name of the progress source. |
| [in] | progress | The initial progress value. |
Implements InfoPipe.
References addProgressSource().
Referenced by addProgressSource(), and addProgressSource().
|
finaloverrideprivatevirtual |
Registers a new progress source at a specific index with a display name and initial progress.
| [in] | name | The display name of the progress source. |
| [in] | idx | The index to assign to the progress source. |
| [in] | progress | The initial progress value. |
Implements InfoPipe.
References addProgressSource().
|
finaloverridevirtual |
|
finaloverrideprivatevirtual |
Checks whether any cancel has been requested across all guards.
Implements InfoPipe.
References cancelRequested().
Referenced by cancelRequested().
|
finaloverrideprivatevirtual |
Checks whether cancel has been requested for a specific guard.
| [in] | idx | The index of the cancel guard to check. |
Implements InfoPipe.
References cancelRequestedIdx().
Referenced by cancelRequestedIdx().
|
finaloverrideprivatevirtual |
Clears the stored input for a specific input guard.
| [in] | idx | The index of the input guard to clear. |
Implements InfoPipe.
References clearInputIdx().
Referenced by clearInputIdx().
| void Log::concatenate | ( | const Log & | log | ) |
Appends all messages from another Log into this one.
| [in] | log | The log whose messages will be concatenated. |
References Log(), and concatenate().
Referenced by concatenate().
Retrieves the input string for a specific input guard.
| [in] | s | The string to populate with the input value. |
| [in] | idx | The index of the input guard. |
| [in] | clear | Whether to clear the stored input after retrieval. |
Reimplemented from InfoPipe.
References getInputIdx().
Referenced by getInputIdx().
| void Log::insertMessages | ( | uint04 | index, |
| const Buffer< LogMessage > & | messages ) |
Inserts multiple LogMessages at a specific index in the log buffer.
| [in] | index | The position at which to insert the messages. |
| [in] | messages | The buffer of LogMessages to insert. |
References Buffer< LogMessage >::Buffer(), and insertMessages().
Referenced by insertMessages().
Retrieves the current progress percentage for a tracked progress source.
| [in] | idx | The index of the progress source. |
Reimplemented from InfoPipe.
References progressIdx().
Referenced by progressIdx().
|
finaloverrideprivatevirtual |
Removes a previously registered cancel guard.
| [in] | idx | The index of the cancel guard to remove. |
Implements InfoPipe.
References removeCancelGuard().
Referenced by removeCancelGuard().
|
finaloverrideprivatevirtual |
Removes a previously registered input guard.
| [in] | idx | The index of the input guard to remove. |
Implements InfoPipe.
References removeInputGuard().
Referenced by removeInputGuard().
|
finaloverrideprivatevirtual |
Removes a previously registered progress source.
| [in] | idx | The index of the progress source to remove. |
Implements InfoPipe.
References removeProgressSource().
Referenced by removeProgressSource().
|
finaloverridevirtual |
|
finaloverrideprivatevirtual |
Requests cancellation of a specific operation by index.
| [in] | idx | The index of the cancel guard to cancel. |
Implements InfoPipe.
References requestCancel().
Sets the progress percentage for a tracked progress source.
| [in] | idx | The index of the progress source. |
| [in] | percent | The progress value as a fraction (0.0 to 1.0). |
Implements InfoPipe.
References setProgressIdx().
Referenced by setProgressIdx().