Defines | |
| #define | it_assert0(t, s) ((void)0) |
| #define | it_assert1(t, s) ((void)0) |
| #define | it_assert(t, s) (void)((t) || (it_assert_f(#t,s,__FILE__,__LINE__),0)) |
Abort if t is NOT true and output s. | |
| #define | it_error_if(t, s) (void)((!(t)) || (it_error_f(s,__FILE__,__LINE__),0)) |
Abort if t is true and output s. | |
| #define | it_error(s) it_error_f(s,__FILE__,__LINE__) |
Abort and output s. | |
| #define | it_warning(s) it_warning_f(s,__FILE__,__LINE__) |
Output the warning s. | |
Functions | |
| void | SPUC::it_assert_f (string ass, string msg, string file, int line) |
Helper function for the it_assert functions. | |
| void | SPUC::it_error_f (string msg, string file, int line) |
Helper function for the it_error functions. | |
| void | SPUC::it_warning_f (string msg, string file, int line) |
Helper function for the it_warning functions. | |
| void | SPUC::it_enable_exceptions (bool on) |
| Enable/disable using exceptions for error handling. | |
| void | SPUC::it_enable_warnings () |
| Enable warnings. | |
| void | SPUC::it_disable_warnings () |
| Disable warnings. | |
| void | SPUC::it_redirect_warnings (ostream *warn_stream) |
| Redirect warnings to the ostream warn_stream. | |
s is a string that is displayed.
it_assert(t,s); // Abort if \c t is not true. it_assert0(t,s); // Abort if \c t is not true and ASSERT_LEVEL = 2 it_assert1(t,s); // Abort if \c t is not true and ASSERT_LEVEL = 2 or 1 it_error_if(t,s); // Abort if \c t is true. it_error(s); // Abort. it_warning(s); // Show a warning.
it_assert(), it_error() and it_warning() is always active while it_assert0() and it_assert1() depends on the ASSERT_LEVEL variable. If ASSERT_LEVEL == 0 then none of these are executed while if it is 1 only it_assert1() is executed.
|
|
Abort if
|
|
|
|
|
|
|
|
|
Abort and output
|
|
|
Abort if
|
|
|
Output the warning
|
|
||||||||||||||||||||
|
Helper function for the
|
|
|
Disable warnings.
|
|
|
Enable/disable using exceptions for error handling.
|
|
|
Enable warnings.
|
|
||||||||||||||||
|
Helper function for the
|
|
|
Redirect warnings to the ostream warn_stream.
|
|
||||||||||||||||
|
Helper function for the
|
1.4.4