NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_macros.h File Reference
#include <iostream>

Go to the source code of this file.

Macros

#define NIMBLE_ASSERT_IMPL(cond, msg, ...)
 
#define NIMBLE_PANIC_IMPL(cond, msg, ...)
 
#define NIMBLE_ABORT_IMPL(msg, ...)
 
#define NIMBLE_TRACE_IMPL(msg, ...)
 
#define NIMBLE_DUMP_IMPL(msg, ...)
 
#define NIMBLE_ASSERT(...)
 
#define NIMBLE_PANIC(...)
 
#define NIMBLE_ABORT(...)
 
#define NIMBLE_TRACE(...)
 
#define NIMBLE_DUMP(...)
 
#define NIMBLE_EXPECT(...)
 
#define NIMBLE_ALWAYS_ASSERT(cond)
 
#define NIMBLE_ALWAYS_ASSERT_VERBOSE(cond, msg)
 
#define NIMBLE_DEBUG_ASSERT(cond)
 
#define NIMBLE_DEBUG_ASSERT_VERBOSE(cond, msg)
 

Macro Definition Documentation

◆ NIMBLE_ABORT

#define NIMBLE_ABORT ( ...)
Value:
NIMBLE_ABORT_IMPL(__VA_ARGS__, "")
#define NIMBLE_ABORT_IMPL(msg,...)
Definition nimble_macros.h:67

◆ NIMBLE_ABORT_IMPL

#define NIMBLE_ABORT_IMPL ( msg,
... )
Value:
do { \
std::cerr << " NIMBLE_ABORT statement at "; \
std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
abort(); \
} while (0)
67#define NIMBLE_ABORT_IMPL(msg, ...) \
68 do { \
69 std::cerr << " NIMBLE_ABORT statement at "; \
70 std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
71 abort(); \
72 } while (0)

◆ NIMBLE_ALWAYS_ASSERT

#define NIMBLE_ALWAYS_ASSERT ( cond)
Value:
#define NIMBLE_ASSERT(...)
Definition nimble_macros.h:85

◆ NIMBLE_ALWAYS_ASSERT_VERBOSE

#define NIMBLE_ALWAYS_ASSERT_VERBOSE ( cond,
msg )
Value:
NIMBLE_ASSERT(cond, msg)

◆ NIMBLE_ASSERT

#define NIMBLE_ASSERT ( ...)
Value:
NIMBLE_ASSERT_IMPL(__VA_ARGS__, "")
#define NIMBLE_ASSERT_IMPL(cond, msg,...)
Definition nimble_macros.h:49

◆ NIMBLE_ASSERT_IMPL

#define NIMBLE_ASSERT_IMPL ( cond,
msg,
... )
Value:
do { \
if (!(cond)) { \
std::cerr << #cond " NIMBLE_ASSERT failed at "; \
std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
abort(); \
} \
} while (0)
49#define NIMBLE_ASSERT_IMPL(cond, msg, ...) \
50 do { \
51 if (!(cond)) { \
52 std::cerr << #cond " NIMBLE_ASSERT failed at "; \
53 std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
54 abort(); \
55 } \
56 } while (0)

◆ NIMBLE_DEBUG_ASSERT

#define NIMBLE_DEBUG_ASSERT ( cond)
Value:
#define NIMBLE_EXPECT(...)
Definition nimble_macros.h:92

◆ NIMBLE_DEBUG_ASSERT_VERBOSE

#define NIMBLE_DEBUG_ASSERT_VERBOSE ( cond,
msg )
Value:
NIMBLE_EXPECT(cond, msg)

◆ NIMBLE_DUMP

#define NIMBLE_DUMP ( ...)
Value:
NIMBLE_DUMP_IMPL(__VA_ARGS__, "")
#define NIMBLE_DUMP_IMPL(msg,...)
Definition nimble_macros.h:80

◆ NIMBLE_DUMP_IMPL

#define NIMBLE_DUMP_IMPL ( msg,
... )
Value:
do { \
std::cerr << msg; \
} while (0)
80#define NIMBLE_DUMP_IMPL(msg, ...) \
81 do { \
82 std::cerr << msg; \
83 } while (0)

◆ NIMBLE_EXPECT

#define NIMBLE_EXPECT ( ...)

◆ NIMBLE_PANIC

#define NIMBLE_PANIC ( ...)
Value:
NIMBLE_PANIC_IMPL(__VA_ARGS__, "")
#define NIMBLE_PANIC_IMPL(cond, msg,...)
Definition nimble_macros.h:58

◆ NIMBLE_PANIC_IMPL

#define NIMBLE_PANIC_IMPL ( cond,
msg,
... )
Value:
do { \
if ((cond)) { \
std::cerr << #cond " NIMBLE_PANIC condition at "; \
std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
abort(); \
} \
} while (0)
58#define NIMBLE_PANIC_IMPL(cond, msg, ...) \
59 do { \
60 if ((cond)) { \
61 std::cerr << #cond " NIMBLE_PANIC condition at "; \
62 std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
63 abort(); \
64 } \
65 } while (0)

◆ NIMBLE_TRACE

#define NIMBLE_TRACE ( ...)
Value:
NIMBLE_TRACE_IMPL(__VA_ARGS__, "")
#define NIMBLE_TRACE_IMPL(msg,...)
Definition nimble_macros.h:74

◆ NIMBLE_TRACE_IMPL

#define NIMBLE_TRACE_IMPL ( msg,
... )
Value:
do { \
std::cerr << "********** NIMBLE_TRACE at "; \
std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
} while (0)
74#define NIMBLE_TRACE_IMPL(msg, ...) \
75 do { \
76 std::cerr << "********** NIMBLE_TRACE at "; \
77 std::cerr << __FILE__ << " +" << __LINE__ << "\n" << msg << '\n'; \
78 } while (0)