Geogram
Version 1.9.1
A programming library of geometric algorithms
|
Assertion checking mechanism. More...
Go to the source code of this file.
Namespaces | |
GEO | |
Global Vorpaline namespace. | |
Macros | |
#define | geo_assert(x) |
Verifies that a condition is met. More... | |
#define | geo_range_assert(x, min_val, max_val) |
Verifies that a value is in a legal range. More... | |
#define | geo_assert_not_reached |
Sets a non reachable point in the program. More... | |
#define | geo_debug_assert(x) |
Verifies that a condition is met. More... | |
#define | geo_debug_range_assert(x, min_val, max_val) |
Verifies that a value is in a legal range. More... | |
#define | geo_debug(x) |
#define | geo_parano_assert(x) |
Verifies that a condition is met. More... | |
#define | geo_parano_range_assert(x, min_val, max_val) |
Verifies that a value is in a legal range. More... | |
Enumerations | |
enum | GEO::AssertMode { GEO::ASSERT_THROW , GEO::ASSERT_ABORT , GEO::ASSERT_BREAKPOINT } |
Assert termination mode. More... | |
Functions | |
void | GEO::set_assert_mode (AssertMode mode) |
Sets assertion mode. More... | |
AssertMode | GEO::assert_mode () |
Returns the current assert termination mode. | |
GEO_NORETURN_DECL void | GEO::geo_abort () GEO_NORETURN |
Aborts the program. More... | |
GEO_NORETURN_DECL void | GEO::geo_breakpoint () GEO_NORETURN |
Generates a debugger breakpoint programmatically. More... | |
GEO_NORETURN_DECL void | GEO::geo_assertion_failed (const std::string &condition_string, const std::string &file, int line) GEO_NORETURN |
Prints an assertion failure. More... | |
GEO_NORETURN_DECL void | GEO::geo_range_assertion_failed (double value, double min_value, double max_value, const std::string &file, int line) GEO_NORETURN |
Prints a range assertion failure. More... | |
GEO_NORETURN_DECL void | GEO::geo_should_not_have_reached (const std::string &file, int line) GEO_NORETURN |
Prints an unreachable location failure. More... | |
Assertion checking mechanism.
Definition in file assert.h.
#define geo_assert | ( | x | ) |
Verifies that a condition is met.
Checks if the condition x
. If the condition is false, it prints an error messages and terminates the program.
[in] | x | the boolean expression of the condition |
#define geo_assert_not_reached |
Sets a non reachable point in the program.
#define geo_debug_assert | ( | x | ) |
Verifies that a condition is met.
Checks if the condition x
. If the condition is false, it prints an error messages and terminates the program.
[in] | x | the boolean expression of the condition |
#define geo_debug_range_assert | ( | x, | |
min_val, | |||
max_val | |||
) |
Verifies that a value is in a legal range.
Verifies that value x
is in the range [min_value
, max_value
]. If this is false, it prints an error messages and terminates the program.
[in] | x | the value to verify |
[in] | min_val | minimum allowed value |
[in] | max_val | maximum allowed value |
#define geo_parano_assert | ( | x | ) |
Verifies that a condition is met.
Checks if the condition x
. If the condition is false, it prints an error messages and terminates the program.
[in] | x | the boolean expression of the condition |
#define geo_parano_range_assert | ( | x, | |
min_val, | |||
max_val | |||
) |
Verifies that a value is in a legal range.
Verifies that value x
is in the range [min_value
, max_value
]. If this is false, it prints an error messages and terminates the program.
[in] | x | the value to verify |
[in] | min_val | minimum allowed value |
[in] | max_val | maximum allowed value |
#define geo_range_assert | ( | x, | |
min_val, | |||
max_val | |||
) |
Verifies that a value is in a legal range.
Verifies that value x
is in the range [min_value
, max_value
]. If this is false, it prints an error messages and terminates the program.
[in] | x | the value to verify |
[in] | min_val | minimum allowed value |
[in] | max_val | maximum allowed value |