Defines |
|
| #define | _ERRMSG(x) _SI_PRINTF(_SI_TEXT("ERROR : %s\n"),x); |
| #define | _MSG(x) _SI_PRINTF(_SI_TEXT("MSG : %s\n"),x); |
| #define | _SI_NEW(x, y) { x = new y; _SI_ASSERT( x != NULL ); } |
| #define | _SI_DELETE(ptr) { if ( ptr != NULL ) { delete ptr; ptr = NULL; } } |
| #define | _SI_DELETE_ARRAY(ptr) {if ( ptr != NULL ) { delete [] ptr; ptr = NULL; } } |
| #define | _SI_CALL(x, y) { if (result==SI_SUCCESS) { result = x;if(result != SI_SUCCESS){_ERRMSG(y);}}} |
| #define _ERRMSG | ( | x | ) | _SI_PRINTF(_SI_TEXT("ERROR : %s\n"),x); |
Prints error message x. Print location is platform dependent.
| #define _MSG | ( | x | ) | _SI_PRINTF(_SI_TEXT("MSG : %s\n"),x); |
Prints message x. Print location is platform dependent.
| #define _SI_NEW | ( | x, | |||
| y | ) | { x = new y; _SI_ASSERT( x != NULL ); } |
Creates a new instance of y and assigns it to x, making sure it is not NULL.
| #define _SI_DELETE | ( | ptr | ) | { if ( ptr != NULL ) { delete ptr; ptr = NULL; } } |
Deletes ptr, if it is not NULL, and then assigns ptr to NULL.
| #define _SI_DELETE_ARRAY | ( | ptr | ) | {if ( ptr != NULL ) { delete [] ptr; ptr = NULL; } } |
Deletes the array ptr, if it is not NULL, and then assigns ptr to NULL.
| #define _SI_CALL | ( | x, | |||
| y | ) | { if (result==SI_SUCCESS) { result = x;if(result != SI_SUCCESS){_ERRMSG(y);}}} |
If result is SI_SUCCESS, then calls the function x, and assigns the the return to result. If the result is not SI_SUCCESS, prints out the error message y. result must be a defined varaible.