![]() |
|
A facility for transporting diagnostics from thread to thread. More...
#include <diagnosticTransport.h>
Public Member Functions | |
| TfDiagnosticTransport ()=default | |
| Construct an empty TfDiagnosticTransport. | |
| TfDiagnosticTransport (TfDiagnosticTransport &&)=default | |
| TfDiagnosticTransport & | operator= (TfDiagnosticTransport &&)=default |
| TfDiagnosticTransport (const TfDiagnosticTransport &)=delete | |
| TfDiagnosticTransport & | operator= (const TfDiagnosticTransport &)=delete |
| bool | IsEmpty () const |
| Return true if this transport contains no diagnostics. | |
| void | Post () |
| Post all contained diagnostics to the current thread in the order they were originally issued, leaving this transport empty. | |
Friends | |
| class | TfDiagnosticTrap |
A facility for transporting diagnostics from thread to thread.
Typical use is to install a TfDiagnosticTrap in a child thread to intercept diagnostics, then call TfDiagnosticTrap::Transport() to move the accumulated diagnostics into a TfDiagnosticTransport. The parent thread then calls Post() after joining to re-post the transported diagnostics to its own thread, where they will be caught by any active TfDiagnosticTrap or forwarded to diagnostic delegates.
Example usage:
TfDiagnosticTransport has no thread affinity of its own. Post() should be called on the thread that should receive the diagnostics. Definition at line 61 of file diagnosticTransport.h.
|
default |
Construct an empty TfDiagnosticTransport.
|
inline |
Return true if this transport contains no diagnostics.
Definition at line 74 of file diagnosticTransport.h.
|
inline |
Post all contained diagnostics to the current thread in the order they were originally issued, leaving this transport empty.
Definition at line 80 of file diagnosticTransport.h.
|
friend |
Definition at line 85 of file diagnosticTransport.h.