| 1 | /* |
| 2 | * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. |
| 3 | * |
| 4 | * NVIDIA CORPORATION and its licensors retain all intellectual property |
| 5 | * and proprietary rights in and to this software, related documentation |
| 6 | * and any modifications thereto. Any use, reproduction, disclosure or |
| 7 | * distribution of this software and related documentation without an express |
| 8 | * license agreement from NVIDIA CORPORATION is strictly prohibited. |
| 9 | */ |
| 10 | // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. |
| 11 | // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. |
| 12 | |
| 13 | |
| 14 | #ifndef PX_FOUNDATION_PX_ERROR_CALLBACK_H |
| 15 | #define PX_FOUNDATION_PX_ERROR_CALLBACK_H |
| 16 | |
| 17 | /** \addtogroup foundation |
| 18 | @{ |
| 19 | */ |
| 20 | |
| 21 | #include "foundation/PxErrors.h" |
| 22 | #ifndef PX_DOXYGEN |
| 23 | namespace physx |
| 24 | { |
| 25 | #endif |
| 26 | |
| 27 | /** |
| 28 | \brief User defined interface class. Used by the library to emit debug information. |
| 29 | |
| 30 | \note The SDK state should not be modified from within any error reporting functions. |
| 31 | |
| 32 | <b>Threading:</b> The SDK sequences its calls to the output stream using a mutex, so the class need not |
| 33 | be implemented in a thread-safe manner if the SDK is the only client. |
| 34 | */ |
| 35 | class PxErrorCallback |
| 36 | { |
| 37 | public: |
| 38 | |
| 39 | virtual ~PxErrorCallback() {} |
| 40 | |
| 41 | /** |
| 42 | \brief Reports an error code. |
| 43 | \param code Error code, see #PxErrorCode |
| 44 | \param message Message to display. |
| 45 | \param file File error occured in. |
| 46 | \param line Line number error occured on. |
| 47 | */ |
| 48 | virtual void reportError(PxErrorCode::Enum code, const char* message, const char* file, int line) = 0; |
| 49 | |
| 50 | }; |
| 51 | |
| 52 | #ifndef PX_DOXYGEN |
| 53 | } // namespace physx |
| 54 | #endif |
| 55 | |
| 56 | /** @} */ |
| 57 | #endif |
| 58 | |