#include "ktypes.h"
#include "kmath.h"
Defines | |
| #define | k_assert(condition) k_assert_info (condition, knull, __K_FILE__, __K_LINE__) |
| Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode. | |
| #define | k_assert_msg(condition, msg) k_assert_info (condition, msg, __K_FILE__, __K_LINE__) |
| Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode. | |
| #define | k_error k_error_print (__K_FILE__, __K_LINE__, __K_FUNCTION__) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred. | |
| #define | k_error_bool _k_error_bool (__K_FILE__, __K_LINE__, __K_FUNCTION__) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function. | |
| #define | k_error_kint _k_error_kint (__K_FILE__, __K_LINE__, __K_FUNCTION__) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function. | |
| #define | k_error_null _k_error_null (__K_FILE__, __K_LINE__, __K_FUNCTION__) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function. | |
| #define | k_error_void {k_error_print (__K_FILE__, __K_LINE__, __K_FUNCTION__); return;} |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function see k_error_print function. | |
| #define | k_check_equal(v1, v2) if ((v1) != (v2)) return k_error_bool; |
| Checks if the two given parameters are equal if(v1==v2) continue execution else returns kfalse. | |
| #define | k_check_equal_d(v1, v2, e) if (k_fabs ((v1) - (v2)) > (e)) return k_error_bool; |
| Checks if the two given parameters are equal regarding an epsilon value if((v1-v2)<=e) continues execution else returns kfalse. | |
| #define | k_check_notequal(v1, v2) if ((v1) == (v2)) return k_error_bool; |
| Checks if the two given parameters are not equal if(v1!=v2) continues execution else returns kfalse. | |
| #define | k_check_notequal_d(v1, v2, e) if (k_fabs ((v1) - (v2)) < (e)) return k_error_bool; |
| Checks if the two given parameters are not equal regarding an epsilon value if((v1-v2)>=e) continues execution else returns kfalse. | |
| #define | k_check_less(v1, v2) if ((v1) >= (v2)) return k_error_bool; |
| Checks if the first parameter is less than the second one if(v1<v2) continues execution else returns kfalse. | |
| #define | k_check_lesseq(v1, v2) if ((v1) > (v2)) return k_error_bool; |
| Checks if the first parameter is less or equal than the second one if(v1<=v2) continues execution else returns kfalse. | |
| #define | k_check(b) if (!(b)) return k_error_bool; |
| Checks if the condition parameter is true if(b) continues execution else returns kfalse. | |
| #define | k_notnull(b) k_check (knull != (b)) |
| Checks if the condition parameter is not null if(b!=knull) continues execution else returns kfalse. | |
| #define | k_critical(bCond) k_critical_f (bCond, __K_FILE__, __K_LINE__) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| #define | k_critical_int(bCond) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| #define | k_critical_void(bCond) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| #define | k_critical_null(bCond) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| #define | k_critical_bool(bCond) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| #define | k_critical_comment(bCond, sComment) k_critical_comment_f(bCond, __K_FILE__, __K_LINE__, sComment) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called and a comment concerning the critical situation. | |
Functions | |
| KTL_API void | k_error_disable_assert () |
| Disables the asserts execution This does nothing in release mode. | |
| KTL_API void | k_error_enable_assert () |
| Enables the asserts execution This does nothing in release mode. | |
| KTL_API void | k_error_disable_print () |
| Disables the display of error in stdout This does nothing in release mode. | |
| KTL_API void | k_error_enable_print () |
| Enables the display of error in stdout This does nothing in release mode. | |
| KTL_API void | k_assert_info (KBool condition, KString sMsg, KString sFile, KInt32 iLine) |
| Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode. | |
| KTL_API void | k_error_print (KString file, KInt32 line, KString func) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred. | |
| KTL_API KBool | _k_error_bool (KString file, KInt32 line, KString func) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used by the k_error_bool macro. | |
| KTL_API KInt | _k_error_kint (KString file, KInt32 line, KString func) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used by the k_error_kint macro. | |
| KTL_API KPtr | _k_error_null (KString file, KInt32 line, KString func) |
| Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used with k_error_null macro. | |
| KTL_API void | k_critical_init (KFunc_critical_action *fAction) |
| Initializes the critical. | |
| KTL_API KBool | k_critical_f (KBool bCond, KString sFile, KUInt32 iLine) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called. | |
| KTL_API KBool | k_critical_comment_f (KBool bCond, KString sFile, KUInt32 iLine, KString sComment) |
| Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called and a comment concerning the critical situation. | |
|
|
Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode.
|
|
|
Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode.
|
|
|
Checks if the condition parameter is true if(b) continues execution else returns kfalse.
|
|
|
Checks if the two given parameters are equal if(v1==v2) continue execution else returns kfalse.
|
|
|
Checks if the two given parameters are equal regarding an epsilon value if((v1-v2)<=e) continues execution else returns kfalse.
|
|
|
Checks if the first parameter is less than the second one if(v1<v2) continues execution else returns kfalse.
|
|
|
Checks if the first parameter is less or equal than the second one if(v1<=v2) continues execution else returns kfalse.
|
|
|
Checks if the two given parameters are not equal if(v1!=v2) continues execution else returns kfalse.
|
|
|
Checks if the two given parameters are not equal regarding an epsilon value if((v1-v2)>=e) continues execution else returns kfalse.
|
|
|
Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Value: Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called and a comment concerning the critical situation.
|
|
|
Value: Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Value: Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Value: Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function.
|
|
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function.
|
|
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function.
|
|
|
Checks if the condition parameter is not null if(b!=knull) continues execution else returns kfalse.
|
|
||||||||||||||||
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used by the k_error_bool macro.
|
|
||||||||||||||||
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used by the k_error_kint macro.
|
|
||||||||||||||||
|
Prints an error message specifying the file name, the line number and the function name where the error occurred Calls the k_error_print function Used with k_error_null macro.
|
|
||||||||||||||||||||
|
Stops execution of code if condition is false in debug mode and prints a message, the file name and the line number where the execution is stopped This does nothing in release mode.
|
|
||||||||||||||||||||
|
Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called and a comment concerning the critical situation.
|
|
||||||||||||||||
|
Stops the execution if the condition parameter is not true Displays an error message specifying the file name and the line number where this function is called.
|
|
|
Initializes the critical.
|
|
||||||||||||||||
|
Prints an error message specifying the file name, the line number and the function name where the error occurred.
|
1.3.8