HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TfErrorTransport Class Reference

#include <errorTransport.h>

Public Types

typedef TfDiagnosticMgr::ErrorList ErrorList
 

Public Member Functions

 TfErrorTransport ()
 Construct an empty TfErrorTransport. More...
 
void Post ()
 
bool IsEmpty () const
 
void swap (TfErrorTransport &other)
 

Friends

class TfErrorMark
 

Detailed Description

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 46 of file errorTransport.h.

Member Typedef Documentation

Constructor & Destructor Documentation

TfErrorTransport::TfErrorTransport ( )
inline

Construct an empty TfErrorTransport.

Definition at line 52 of file errorTransport.h.

Member Function Documentation

bool TfErrorTransport::IsEmpty ( ) const
inline

Return true if this TfErrorTransport contains no errors, false otherwise.

Definition at line 63 of file errorTransport.h.

void TfErrorTransport::Post ( )
inline

Post all contained errors to the current thread's error list, leaving this TfErrorTransport empty.

Definition at line 56 of file errorTransport.h.

void TfErrorTransport::swap ( TfErrorTransport other)
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 68 of file errorTransport.h.

Friends And Related Function Documentation

friend class TfErrorMark
friend

Definition at line 73 of file errorTransport.h.


The documentation for this class was generated from the following file: