HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diagnosticHelper.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_BASE_TF_DIAGNOSTIC_HELPER_H
25 #define PXR_BASE_TF_DIAGNOSTIC_HELPER_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/base/tf/api.h"
30 
31 // XXX: This include is a hack to avoid build errors due to
32 // incompatible macro definitions in pyport.h on macOS.
33 #include <locale>
34 
35 #include <hboost/any.hpp>
36 #include <string>
37 
39 
41 class TfCallContext;
42 enum TfDiagnosticType : int;
43 class TfEnum;
44 class TfError;
45 
46 TF_API void
48  const TfCallContext &context,
49  const TfEnum &code,
50  const std::string &msg);
51 
52 TF_API void
54  const TfCallContext &context,
55  TfDiagnosticType code,
56  const std::string &msg);
57 
58 TF_API void
60  const TfCallContext &context,
61  const TfEnum &code,
62  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
63 
64 TF_API void
66  const TfCallContext &context,
67  TfDiagnosticType code,
68  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
69 
70 TF_API void
72  const TfCallContext &context,
73  const TfDiagnosticInfo &info,
74  const TfEnum &code,
75  const std::string &msg);
76 
77 TF_API void
79  const TfCallContext &context,
80  const TfDiagnosticInfo &info,
81  const TfEnum &code,
82  const char *fmt, ...) ARCH_PRINTF_FUNCTION(4, 5);
83 
84 TF_API void
86  const TfCallContext &context,
87  const TfEnum &code,
88  const TfDiagnosticInfo &info,
89  const std::string &msg);
90 
91 TF_API void
93  const TfCallContext &context,
94  const TfEnum &code,
95  const TfDiagnosticInfo &info,
96  const char *fmt, ...) ARCH_PRINTF_FUNCTION(4, 5);
97 
98 TF_API void
100  const TfCallContext &context,
101  const TfEnum &code,
102  const std::string &msg);
103 
104 TF_API void
106  const TfCallContext &context,
107  const TfEnum &code,
108  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
109 
110 
111 // Helper functions for posting a warning with TF_WARN.
112 TF_API void
114  const std::string &msg);
115 
116 TF_API void
118  const char *fmt, ...) ARCH_PRINTF_FUNCTION(2, 3);
119 
120 TF_API void
122  const TfCallContext &context,
123  const TfEnum &code,
124  const std::string &msg);
125 
126 TF_API void
128  const TfCallContext &context,
129  TfDiagnosticType code,
130  const std::string &msg);
131 
132 TF_API void
134  const TfCallContext &context,
135  const TfEnum &code,
136  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
137 
138 TF_API void
140  const TfCallContext &context,
141  TfDiagnosticType code,
142  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
143 
144 TF_API void
146  const TfCallContext &context,
147  const TfDiagnosticInfo &info,
148  const TfEnum &code,
149  const std::string &msg);
150 
151 TF_API void
153  const TfCallContext &context,
154  const TfDiagnosticInfo &info,
155  const TfEnum &code,
156  const char *fmt, ...) ARCH_PRINTF_FUNCTION(4, 5);
157 
158 TF_API void
160  const TfCallContext &context,
161  const char *fmt, ...) ARCH_PRINTF_FUNCTION(2, 3);
162 
163 TF_API void
165  const TfCallContext &context,
166  const std::string &msg);
167 
168 
169 TF_API void
171  const TfCallContext &context,
172  const TfEnum &code,
173  const std::string &msg);
174 
175 TF_API void
177  const TfCallContext &context,
178  const TfEnum &code,
179  const char *fmt, ...) ARCH_PRINTF_FUNCTION(3, 4);
180 
181 TF_API void
183  const TfCallContext &context,
184  const TfDiagnosticInfo &info,
185  const TfEnum &code,
186  const std::string &msg);
187 
188 TF_API void
190  const TfCallContext &context,
191  const TfDiagnosticInfo &info,
192  const TfEnum &code,
193  const char *fmt, ...) ARCH_PRINTF_FUNCTION(4, 5);
194 
196 
197 #endif // PXR_BASE_TF_DIAGNOSTIC_HELPER_H
PXR_NAMESPACE_OPEN_SCOPE typedef hboost::any TfDiagnosticInfo
TF_API void TF_API void Tf_PostStatusHelper(const TfCallContext &context, const char *fmt,...) ARCH_PRINTF_FUNCTION(2
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define TF_API
Definition: api.h:40
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
Definition: enum.h:137
TF_API void TF_API void Tf_PostQuietlyErrorHelper(const TfCallContext &context, const TfEnum &code, const TfDiagnosticInfo &info, const std::string &msg)
TF_API void TF_API void Tf_PostWarningHelper(const TfCallContext &context, const std::string &msg)
bool any(const vbool4 &v)
Definition: simd.h:3468
TfDiagnosticType
Definition: error.h:49
TF_API void Tf_PostErrorHelper(const TfCallContext &context, const TfEnum &code, const std::string &msg)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
#define const
Definition: zconf.h:214