#include <icy/diagnosticmanager.h>Inherits:
Stateful< DiagnosticState >Subclassed by:AsyncDiagnostic
Abstract interface for diagnostic information providers.
| Return | Name | Description |
|---|---|---|
std::string | name | The name of the diagnostic. |
std::string | description | The diagnostic description. |
std::vector< std::string > | summary | The diagnostic summary, maybe including troubleshooting information on failure. |
ThreadSignal< void(const std::string &)> | SummaryUpdated | Signals when a new text item is added to the summary. |
std::string nameThe name of the diagnostic.
std::string descriptionThe diagnostic description.
std::vector< std::string > summaryThe diagnostic summary, maybe including troubleshooting information on failure.
ThreadSignal< void(const std::string &)> SummaryUpdatedSignals when a new text item is added to the summary.
| Return | Name | Description |
|---|---|---|
IDiagnostic | ||
void | check virtual | Resets state to None and invokes run() to perform the diagnostic check. |
void | reset virtual | Clears the summary and resets state to None. |
bool | complete virtual const | Returns true if the diagnostic has reached a terminal state (Passed or Failed). |
bool | passed virtual const | Returns true if the diagnostic state is Passed. |
bool | failed virtual const | Returns true if the diagnostic state is Failed. |
IDiagnostic()virtual
virtual void check()Resets state to None and invokes run() to perform the diagnostic check.
virtual
virtual void reset()Clears the summary and resets state to None.
virtual const
virtual bool complete() constReturns true if the diagnostic has reached a terminal state (Passed or Failed).
true if complete.
virtual const
virtual bool passed() constReturns true if the diagnostic state is Passed.
true if passed.
virtual const
virtual bool failed() constReturns true if the diagnostic state is Failed.
true if failed.
| Return | Name | Description |
|---|---|---|
void | run | Override to implement diagnostic logic. |
bool | pass virtual | Transitions the state to Passed. |
bool | fail virtual | Transitions the state to Failed. |
void | addSummary virtual | Appends text to the summary list and emits SummaryUpdated. |
void run()Override to implement diagnostic logic.
The StateChange signal will dispatch diagnostic test results to delegates.
virtual
virtual bool pass()Transitions the state to Passed.
true if the state transition succeeded.
virtual
virtual bool fail()Transitions the state to Failed.
true if the state transition succeeded.
virtual
virtual void addSummary(const std::string & text)Appends text to the summary list and emits SummaryUpdated.
text Summary line to append.