Loading...
Searching...
No Matches
diagnosticTransport.h
Go to the documentation of this file.
1//
2// Copyright 2026 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_TF_DIAGNOSTIC_TRANSPORT_H
8#define PXR_BASE_TF_DIAGNOSTIC_TRANSPORT_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/base/tf/api.h"
15#include "pxr/base/tf/error.h"
16#include "pxr/base/tf/status.h"
17#include "pxr/base/tf/warning.h"
18
19#include <functional>
20#include <optional>
21#include <string>
22#include <type_traits>
23#include <vector>
24
25PXR_NAMESPACE_OPEN_SCOPE
26
27class TfDiagnosticMgr;
29
62{
63public:
66
68 TfDiagnosticTransport &operator=(TfDiagnosticTransport &&) = default;
69
71 TfDiagnosticTransport &operator=(const TfDiagnosticTransport &) = delete;
72
74 bool IsEmpty() const {
75 return _container.IsEmpty();
76 }
77
80 void Post() {
81 _container.Post();
82 }
83
84private:
85 friend class TfDiagnosticTrap;
86
87 // TfDiagnosticTrap calls this to implement Transport().
88 explicit TfDiagnosticTransport(Tf_DiagnosticContainer &&container)
89 : _container(std::move(container))
90 {}
91
92 Tf_DiagnosticContainer _container;
93};
94
95PXR_NAMESPACE_CLOSE_SCOPE
96
97#endif // PXR_BASE_TF_DIAGNOSTIC_TRANSPORT_H
Provide facilities for error handling in script.
Singleton class through which all errors and diagnostics pass.
Definition: diagnosticMgr.h:55
A facility for transporting diagnostics from thread to thread.
void Post()
Post all contained diagnostics to the current thread in the order they were originally issued,...
TfDiagnosticTransport()=default
Construct an empty TfDiagnosticTransport.
bool IsEmpty() const
Return true if this transport contains no diagnostics.
A scoped, stack-based mechanism for intercepting and examining diagnostics issued on the current thre...
STL namespace.