#include "psError.h"
#include "psLogMsg.h"
Include dependency graph for psAssert.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | PS_ASSERT_INT_UNEQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_INT_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_INT_NONNEGATIVE(NAME, RVAL) |
| #define | PS_ASSERT_INT_POSITIVE(NAME, RVAL) |
| #define | PS_ASSERT_INT_ZERO(NAME, RVAL) |
| #define | PS_ASSERT_INT_NONZERO(NAME, RVAL) |
| #define | PS_ASSERT_INT_WITHIN_RANGE(NAME, LOWER, UPPER, RVAL) |
| #define | PS_ASSERT_INT_LESS_THAN(VAR1, VAR2, RVAL) |
| #define | PS_ASSERT_INT_LESS_THAN_OR_EQUAL(VAR1, VAR2, RVAL) |
| #define | PS_ASSERT_INT_LARGER_THAN(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_INT_LARGER_THAN_OR_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_LARGER_THAN(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_LARGER_THAN_OR_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_LESS_THAN(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_LESS_THAN_OR_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_NON_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_EQUAL(NAME1, NAME2, RVAL) |
| #define | PS_ASSERT_FLOAT_WITHIN_RANGE(NAME, LOWER, UPPER, RVAL) |
| #define | PS_ASSERT_DOUBLE_WITHIN_RANGE(NAME, LOWER, UPPER, RVAL) |
| #define | PS_ASSERT_LONG_WITHIN_RANGE(NAME, LOWER, UPPER, RVAL) |
| #define | PS_WARN_PTR_NON_NULL(NAME) |
| #define | PS_ASSERT_PTR_NON_NULL(NAME, RVAL) PS_ASSERT_GENERAL_PTR_NON_NULL(NAME, return RVAL) |
| #define | PS_ASSERT_GENERAL_PTR_NON_NULL(NAME, CLEANUP) |
| #define | PS_ASSERT_PTR_TYPE(NAME, TYPE, RVAL) |
| #define | PS_ASSERT_PTR_DIMEN(NAME, DIMEN, RVAL) PS_ASSERT_GENERAL_PTR_DIMEN(NAME, DIMEN, return RVAL) |
| #define | PS_ASSERT_GENERAL_PTR_DIMEN(NAME, DIMEN, CLEANUP) |
| #define | PS_ASSERT_PTR_DIMEN_GENERAL_NOT(NAME, DIMEN, CLEANUP) |
| #define | PS_ASSERT_PTRS_SIZE_EQUAL(PTR1, PTR2, RVAL) |
| #define | PS_ASSERT_PTR_TYPE_EQUAL(PTR1, PTR2, RVAL) PS_ASSERT_PTRS_TYPE_EQUAL_GENERAL(PTR1, PTR2, return RVAL) |
| #define | PS_ASSERT_PTRS_TYPE_EQUAL_GENERAL(PTR1, PTR2, CLEANUP) |
|
|
Value: if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s, %lf, is out of range. Must be between %lf and %lf.", \ #NAME, NAME, LOWER, UPPER); \ return RVAL; \ } Definition at line 145 of file psAssert.h. |
|
|
Value: if (fabs((NAME2) - (NAME1)) > FLT_EPSILON) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s and %s are not equal.", \ #NAME1, #NAME2); \ return(RVAL); \ } Definition at line 128 of file psAssert.h. |
|
|
Value: if (!((NAME1) > (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s > %s) (%f %f).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 88 of file psAssert.h. |
|
|
Value: if (!((NAME1) >= (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s >= %s) (%f %f).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 96 of file psAssert.h. |
|
|
Value: if (!((NAME1) < (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s < %s) (%f %f).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 104 of file psAssert.h. |
|
|
Value: if (!((NAME1) <= (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s <= %s) (%f %f).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 112 of file psAssert.h. |
|
|
Value: if (fabs((NAME2) - (NAME1)) < FLT_EPSILON) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s and %s are equal.", \ #NAME1, #NAME2); \ return(RVAL); \ } Definition at line 120 of file psAssert.h. |
|
|
Value: if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s, %f, is out of range. Must be between %f and %f.", \ #NAME, NAME, LOWER, UPPER); \ return RVAL; \ } Definition at line 137 of file psAssert.h. |
|
|
Value: if ((NAME)->type.dimen != DIMEN) { \ psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ "Unallowable operation: %s has incorrect dimensionality.", \ #NAME); \ CLEANUP; \ } Definition at line 188 of file psAssert.h. |
|
|
Value: if ((NAME) == NULL) { \ psError(PS_ERR_BAD_PARAMETER_NULL, true, \ "Unallowable operation: %s is NULL.", \ #NAME); \ CLEANUP; \ } Definition at line 171 of file psAssert.h. |
|
|
Value: if ((NAME1) != (NAME2)) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s and %s are not equal.", \ #NAME1, #NAME2); \ return(RVAL); \ } Definition at line 15 of file psAssert.h. |
|
|
Value: if (!((NAME1) > (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s > %s) (%d %d).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 73 of file psAssert.h. |
|
|
Value: if (!((NAME1) >= (NAME2))) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: !(%s >= %s) (%d %d).", \ #NAME1, #NAME2, NAME1, NAME2); \ return(RVAL); \ } Definition at line 81 of file psAssert.h. |
|
|
Value: if (!(VAR1 < VAR2)) { \ psError(PS_ERR_UNKNOWN, true, \ "Error: %s is not less than %s (%d, %d)", #VAR1, #VAR2, VAR1, VAR2); \ return(RVAL); \ } Definition at line 59 of file psAssert.h. |
|
|
Value: if (!(VAR1 <= VAR2)) { \ psError(PS_ERR_UNKNOWN, true, \ "Error: %s is not less than %s (%d, %d)", #VAR1, #VAR2, VAR1, VAR2); \ return(RVAL); \ } Definition at line 66 of file psAssert.h. |
|
|
Value: if ((NAME) < 0) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error: %s is less than 0.", #NAME); \ return(RVAL); \ } Definition at line 23 of file psAssert.h. |
|
|
Value: if ((NAME) == 0) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s is 0.", #NAME); \ return(RVAL); \ } Definition at line 43 of file psAssert.h. |
|
|
Value: if ((NAME) < 1) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s is 0 or less.", #NAME); \ return(RVAL); \ } Definition at line 29 of file psAssert.h. |
|
|
Value: if ((NAME1) == (NAME2)) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s and %s are equal.", \ #NAME1, #NAME2); \ return(RVAL); \ } Definition at line 7 of file psAssert.h. |
|
|
Value: if ((int)(NAME) < LOWER || (int)(NAME) > UPPER) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s, %d, is out of range. Must be between %d and %d.", \ #NAME,(int)NAME,LOWER,UPPER); \ return RVAL; \ } Definition at line 51 of file psAssert.h. |
|
|
Value: if ((NAME) != 0) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s is 0.", #NAME); \ return(RVAL); \ } Definition at line 36 of file psAssert.h. |
|
|
Value: if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: %s, %lld, is out of range.", \ #NAME, NAME, LOWER, UPPER); \ return RVAL; \ } Definition at line 153 of file psAssert.h. |
|
|
Definition at line 187 of file psAssert.h. |
|
|
Value: if ((NAME)->type.dimen == DIMEN) { \ psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ "Unallowable operation: %s has incorrect dimensionality.", \ #NAME); \ CLEANUP; \ } Definition at line 196 of file psAssert.h. |
|
|
Definition at line 170 of file psAssert.h. |
|
|
Value: if ((NAME)->type.type != TYPE) { \ psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ "Unallowable operation: %s has incorrect type.", \ #NAME); \ return(RVAL); \ } Definition at line 179 of file psAssert.h. |
|
|
Definition at line 213 of file psAssert.h. |
|
|
Value: if (PTR1->n != PTR2->n) { \ psError(PS_ERR_BAD_PARAMETER_SIZE, true, \ "ptr %s has size %d, ptr %s has size %d.", \ #PTR1, PTR1->n, #PTR2, PTR2->n); \ return(RVAL); \ } Definition at line 205 of file psAssert.h. |
|
|
Value: if (PTR1->type.type != PTR2->type.type) { \ psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ "ptr %s has type %d, ptr %s has type %d.", \ #PTR1, PTR1->type.type, #PTR2, PTR2->type.type); \ CLEANUP; \ } Definition at line 214 of file psAssert.h. |
|
|
Value: if ((NAME) == NULL) { \ psLogMsg(__func__, PS_LOG_WARN, "WARNING: %s is NULL.", #NAME); \ } \ Definition at line 165 of file psAssert.h. |
1.4.4