|
A facility for transporting errors from thread to thread. More...
#include <errorTransport.h>
Public Types | |
typedef TfDiagnosticMgr::ErrorList | ErrorList |
Public Member Functions | |
TfErrorTransport () | |
Construct an empty TfErrorTransport. | |
void | Post () |
Post all contained errors to the current thread's error list, leaving this TfErrorTransport empty. | |
bool | IsEmpty () const |
Return true if this TfErrorTransport contains no errors, false otherwise. | |
void | swap (TfErrorTransport &other) |
Swap this TfErrorTransport's content with other . | |
Friends | |
class | TfErrorMark |
A facility for transporting errors from thread to thread.
Typical use is to create a TfErrorMark in the thread that is the error source (e.g. the child thread), then call TfErrorMark::Transport() or TfErrorMark::TransportTo() to lift generated errors out into a TfErrorTransport object. Later the thread that wants to sink those errors (e.g. the parent thread) invokes TfErrorTransport::Post() to post all contained errors to its own thread's error list.
Definition at line 29 of file errorTransport.h.
typedef TfDiagnosticMgr::ErrorList ErrorList |
Definition at line 32 of file errorTransport.h.
|
inline |
Construct an empty TfErrorTransport.
Definition at line 35 of file errorTransport.h.
|
inline |
Return true if this TfErrorTransport contains no errors, false otherwise.
Definition at line 46 of file errorTransport.h.
|
inline |
Post all contained errors to the current thread's error list, leaving this TfErrorTransport empty.
Definition at line 39 of file errorTransport.h.
|
inline |
Swap this TfErrorTransport's content with other
.
This provides a lightweight way to move the contents of one TfErrorTransport to another.
Definition at line 51 of file errorTransport.h.
|
friend |
Definition at line 56 of file errorTransport.h.