This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TfErrorTransport Class Reference

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
 

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

Member Typedef Documentation

◆ ErrorList

typedef TfDiagnosticMgr::ErrorList ErrorList

Definition at line 32 of file errorTransport.h.

Constructor & Destructor Documentation

◆ TfErrorTransport()

TfErrorTransport ( )
inline

Construct an empty TfErrorTransport.

Definition at line 35 of file errorTransport.h.

Member Function Documentation

◆ IsEmpty()

bool IsEmpty ( ) const
inline

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

Definition at line 46 of file errorTransport.h.

◆ Post()

void Post ( )
inline

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

Definition at line 39 of file errorTransport.h.

◆ swap()

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

Friends And Related Function Documentation

◆ TfErrorMark

friend class TfErrorMark
friend

Definition at line 56 of file errorTransport.h.


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