All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pyTracing.h
1//
2// Copyright 2016 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_PY_TRACING_H
8#define PXR_BASE_TF_PY_TRACING_H
9
10#include "pxr/pxr.h"
11
12#ifdef PXR_PYTHON_SUPPORT_ENABLED
14#endif // PXR_PYTHON_SUPPORT_ENABLED
15
16#include "pxr/base/tf/api.h"
17
18#include <functional>
19#include <memory>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23#ifdef PXR_PYTHON_SUPPORT_ENABLED
28 PyObject *arg;
29 char const *funcName;
30 char const *fileName;
31 int funcLine;
32 int what;
33};
34
35typedef std::function<void (TfPyTraceInfo const &)> TfPyTraceFn;
36typedef std::shared_ptr<TfPyTraceFn> TfPyTraceFnId;
37
41TF_API TfPyTraceFnId TfPyRegisterTraceFn(TfPyTraceFn const &f);
42
43// For internal use only. Do not use.
44void Tf_PyFabricateTraceEvent(TfPyTraceInfo const &info);
45
46// For internal use only. Do not use.
47void Tf_PyTracingPythonInitialized();
48#else
51struct TfPyTraceInfo;
52typedef std::function<void (TfPyTraceInfo const &)> TfPyTraceFn;
53typedef std::shared_ptr<TfPyTraceFn> TfPyTraceFnId;
54#endif // PXR_PYTHON_SUPPORT_ENABLED
55
56PXR_NAMESPACE_CLOSE_SCOPE
57
58#endif // PXR_BASE_TF_PY_TRACING_H
Intended to replace a direct include of Python.h, which causes several build problems with certain co...
Structure passed to python trace functions.
Definition: pyTracing.h:27