HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diagnosticLite.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/arch/attributes.h"
#include "pxr/base/tf/api.h"
#include "pxr/base/arch/buildMode.h"
#include "pxr/base/arch/hints.h"
#include "pxr/base/tf/callContext.h"
#include <stddef.h>
+ Include dependency graph for diagnosticLite.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Tf_DiagnosticLiteHelper
 

Macros

#define TF_CODING_ERROR
 
#define TF_CODING_WARNING
 
#define TF_FATAL_CODING_ERROR
 
#define TF_RUNTIME_ERROR
 
#define TF_FATAL_ERROR
 
#define TF_DIAGNOSTIC_FATAL_ERROR
 
#define TF_DIAGNOSTIC_NONFATAL_ERROR
 
#define TF_DIAGNOSTIC_WARNING
 
#define TF_WARN
 
#define TF_STATUS
 
#define TF_AXIOM(cond)   Tf_AxiomHelper(static_cast<bool>((cond)), TF_CALL_CONTEXT, #cond)
 
#define TF_DEV_AXIOM(cond)
 

Enumerations

enum  TfDiagnosticType : int {
  TF_DIAGNOSTIC_INVALID_TYPE = 0, TF_DIAGNOSTIC_CODING_ERROR_TYPE, TF_DIAGNOSTIC_FATAL_CODING_ERROR_TYPE, TF_DIAGNOSTIC_RUNTIME_ERROR_TYPE,
  TF_DIAGNOSTIC_FATAL_ERROR_TYPE, TF_DIAGNOSTIC_NONFATAL_ERROR_TYPE, TF_DIAGNOSTIC_WARNING_TYPE, TF_DIAGNOSTIC_STATUS_TYPE,
  TF_APPLICATION_EXIT_TYPE
}
 

Functions

constexpr bool Tf_AxiomHelper (bool val, TfCallContext const &ctx, char const *txt)
 

Detailed Description

Stripped down version of diagnostic.h that doesn't define std::string.

This file provides the same functionality as diagnostic.h, except that all strings must be passed as plain const char*, and not by std::string, and the macro TF_FUNCTION_NAME() is only defined by diagnostic.h

In particular, this header file does not include the C++ header file < string >, making inclusion of this file a very light-weight addition. Include this file, as opposed to pxr/base/tf/diagnostic.h in header files that need to remain as light-weight as possible.

These macros are safe to use in multiple threads, but errors will be converted to warnings because our error handling mechanisms are not thread safe.

Definition in file diagnosticLite.h.

Macro Definition Documentation

#define TF_AXIOM (   cond)    Tf_AxiomHelper(static_cast<bool>((cond)), TF_CALL_CONTEXT, #cond)

Definition at line 141 of file diagnosticLite.h.

#define TF_CODING_ERROR
Value:

Definition at line 94 of file diagnosticLite.h.

#define TF_CODING_WARNING
Value:
#define TF_CALL_CONTEXT
Definition: callContext.h:47
TF_API void TF_API void TF_API void IssueWarning(char const *fmt,...) const ARCH_PRINTF_FUNCTION(2

Definition at line 98 of file diagnosticLite.h.

#define TF_DEV_AXIOM (   cond)
Value:
static_cast<bool>((cond)), TF_CALL_CONTEXT, #cond)
#define TF_CALL_CONTEXT
Definition: callContext.h:47
#define ARCH_DEV_BUILD
Definition: buildMode.h:43
constexpr bool Tf_AxiomHelper(bool val, TfCallContext const &ctx, char const *txt)

Definition at line 144 of file diagnosticLite.h.

#define TF_DIAGNOSTIC_FATAL_ERROR
Value:

Definition at line 114 of file diagnosticLite.h.

#define TF_DIAGNOSTIC_NONFATAL_ERROR
Value:
#define TF_CALL_CONTEXT
Definition: callContext.h:47
TF_API void TF_API void TF_API void IssueWarning(char const *fmt,...) const ARCH_PRINTF_FUNCTION(2

Definition at line 118 of file diagnosticLite.h.

#define TF_DIAGNOSTIC_WARNING
#define TF_FATAL_CODING_ERROR
Value:

Definition at line 102 of file diagnosticLite.h.

#define TF_FATAL_ERROR
Value:

Definition at line 110 of file diagnosticLite.h.

#define TF_RUNTIME_ERROR
Value:

Definition at line 106 of file diagnosticLite.h.

#define TF_STATUS
Value:
#define TF_CALL_CONTEXT
Definition: callContext.h:47
TF_API void TF_API void TF_API void TF_API void IssueStatus(char const *fmt,...) const ARCH_PRINTF_FUNCTION(2

Definition at line 130 of file diagnosticLite.h.

#define TF_WARN
Value:
#define TF_CALL_CONTEXT
Definition: callContext.h:47
TF_API void TF_API void TF_API void IssueWarning(char const *fmt,...) const ARCH_PRINTF_FUNCTION(2

Definition at line 126 of file diagnosticLite.h.

Enumeration Type Documentation

Enum describing various diagnostic conditions.

Enumerator
TF_DIAGNOSTIC_INVALID_TYPE 
TF_DIAGNOSTIC_CODING_ERROR_TYPE 
TF_DIAGNOSTIC_FATAL_CODING_ERROR_TYPE 
TF_DIAGNOSTIC_RUNTIME_ERROR_TYPE 
TF_DIAGNOSTIC_FATAL_ERROR_TYPE 
TF_DIAGNOSTIC_NONFATAL_ERROR_TYPE 
TF_DIAGNOSTIC_WARNING_TYPE 
TF_DIAGNOSTIC_STATUS_TYPE 
TF_APPLICATION_EXIT_TYPE 

Definition at line 57 of file diagnosticLite.h.

Function Documentation

constexpr bool Tf_AxiomHelper ( bool  val,
TfCallContext const ctx,
char const txt 
)

Definition at line 135 of file diagnosticLite.h.