AGX Dynamics 2.39.0.0
|
#include <cassert>
#include <cstdlib>
#include <stdexcept>
#include <cstdarg>
#include <cstdio>
#include <string>
#include <agx/agxCore_export.h>
Go to the source code of this file.
Namespaces | |
namespace | agx |
The agx namespace contains the dynamics/math part of the AGX Dynamics API. | |
Macros | |
#define | AGX_ASM_COMMENT(X) |
#define | agx_fprintf fprintf |
#define | AGX_FUNCTION __PRETTY_FUNCTION__ |
#define | AGX_MACRO(x) do {x} while(0) |
#define | AGX_NO_RETURN |
#define | agx_snprintf snprintf |
#define | AGX_WHERE_AM_I agx::buildErrorString("[%s:%u (%s)]", "", __FILE__, __LINE__, AGX_FUNCTION) |
#define | agxAbort() AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort", "", __FILE__, __LINE__ ).c_str()); agx::abort();) |
#define | agxAbort1(msg) AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort: ", "%s", __FILE__, __LINE__, agx::cStr(msg)).c_str()); agx::abort();) |
#define | agxAbortN(format, ...) AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort: ", format, __FILE__, __LINE__, ##__VA_ARGS__).c_str()); agx::abort();) |
#define | agxAssert(expr) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s'", "", __FILE__, __LINE__, #expr).c_str()); agx::abort();}) |
#define | agxAssert1(expr, msg) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)).c_str()); agx::abort();}) |
#define | agxAssertN(expr, format, ...) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__).c_str()); agx::abort();}) |
#define | agxAssertVoid() AGX_MACRO( {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s'", "", __FILE__, __LINE__).c_str()); agx::abort();}) |
#define | agxDebugVerify(expr) agxAssert(expr) |
#define | agxDebugVerify1(expr, msg) agxAssert1(expr, msg) |
#define | agxDebugVerifyN(expr, format, ...) agxAssertN(expr, format, __VA_ARGS__) |
#define | agxThrow throw agx_internal::ExceptionDescriber(AGX_WHERE_AM_I) % |
#define | agxVerify(expr) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s'", "", __FILE__, __LINE__, #expr).c_str()); agx::abort();}) |
#define | agxVerify1(expr, msg) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)).c_str()); agx::abort();}) |
#define | agxVerifyN(expr, format, ...) AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__).c_str()); agx::abort();}) |
#define | agxVerifyThrow(expr) AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s'", "", __FILE__, __LINE__, #expr); agxThrow agx::Error(errorMessage);}) |
#define | agxVerifyThrow1(expr, msg) AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)); agxThrow agx::Error(errorMessage);}) |
#define | agxVerifyThrowN(expr, format, ...) AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__); agxThrow agx::Error(errorMessage);}) |
Typedefs | |
typedef std::runtime_error | agx::Error |
Functions | |
AGXCORE_EXPORT void | agx::abort () AGX_NO_RETURN |
AGXCORE_EXPORT std::string | agx::buildErrorString (const char *baseFormat, std::string msgFormat,...) |
AGXCORE_EXPORT const char * | agx::cStr (const char *str) |
AGXCORE_EXPORT const char * | agx::cStr (const std::string &str) |
AGXCORE_EXPORT int | agx::getExceptionNotifyLevel () |
AGXCORE_EXPORT void | agx::log_throw (const std::string &where, const char *what) |
AGXCORE_EXPORT int | agx::setExceptionNotifyLevel (int level) |
#define AGX_WHERE_AM_I agx::buildErrorString("[%s:%u (%s)]", "", __FILE__, __LINE__, AGX_FUNCTION) |
#define agxAbort | ( | ) | AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort", "", __FILE__, __LINE__ ).c_str()); agx::abort();) |
#define agxAbort1 | ( | msg | ) | AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort: ", "%s", __FILE__, __LINE__, agx::cStr(msg)).c_str()); agx::abort();) |
#define agxAbortN | ( | format, | |
... | |||
) | AGX_MACRO(fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAbort: ", format, __FILE__, __LINE__, ##__VA_ARGS__).c_str()); agx::abort();) |
#define agxAssert | ( | expr | ) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s'", "", __FILE__, __LINE__, #expr).c_str()); agx::abort();}) |
#define agxAssert1 | ( | expr, | |
msg | |||
) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)).c_str()); agx::abort();}) |
#define agxAssertN | ( | expr, | |
format, | |||
... | |||
) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__).c_str()); agx::abort();}) |
#define agxAssertVoid | ( | ) | AGX_MACRO( {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxAssert failed: `%s'", "", __FILE__, __LINE__).c_str()); agx::abort();}) |
#define agxDebugVerify1 | ( | expr, | |
msg | |||
) | agxAssert1(expr, msg) |
#define agxDebugVerifyN | ( | expr, | |
format, | |||
... | |||
) | agxAssertN(expr, format, __VA_ARGS__) |
#define agxThrow throw agx_internal::ExceptionDescriber(AGX_WHERE_AM_I) % |
#define agxVerify | ( | expr | ) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s'", "", __FILE__, __LINE__, #expr).c_str()); agx::abort();}) |
#define agxVerify1 | ( | expr, | |
msg | |||
) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)).c_str()); agx::abort();}) |
#define agxVerifyN | ( | expr, | |
format, | |||
... | |||
) | AGX_MACRO(if (!(expr)) {fprintf(stderr, "%s\n", agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__).c_str()); agx::abort();}) |
#define agxVerifyThrow | ( | expr | ) | AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s'", "", __FILE__, __LINE__, #expr); agxThrow agx::Error(errorMessage);}) |
#define agxVerifyThrow1 | ( | expr, | |
msg | |||
) | AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", "%s", __FILE__, __LINE__, #expr, agx::cStr(msg)); agxThrow agx::Error(errorMessage);}) |
#define agxVerifyThrowN | ( | expr, | |
format, | |||
... | |||
) | AGX_MACRO(if (!(expr)) {std::string errorMessage = agx::buildErrorString("[%s:%u] agxVerify failed: `%s', ", format, __FILE__, __LINE__, #expr, ##__VA_ARGS__); agxThrow agx::Error(errorMessage);}) |