#include <assert.h>
#include <typeinfo>
Go to the source code of this file.
Classes | |
class | DbgTypeDemangler |
Namespaces | |
aworx | |
aworx::lib | |
Macros | |
C/C++ Preprocessor Helper Macros | |
#define | ALIB_COMMA , |
#define | ALIB_COMMA_DBG , |
#define | ALIB_CONCAT(a, b) a ## b |
#define | ALIB_EMPTY |
#define | ALIB_IDENTIFIER(prefix) |
#define | ALIB_NSTRINGIFY(a) |
#define | ALIB_STATIC_ASSERT(CondVariable, Cond, Message) |
#define | ALIB_STATIC_DENY(CondVariable, Cond, Message) |
#define | ALIB_STRINGIFY(a) |
C/C++ Language And Linkage Macros | |
#define | ALIB_CALLER __FILE__, __LINE__, __func__ |
#define | ALIB_CALLER_NULLED ALIB_CALLER |
#define | ALIB_CALLER_PRUNED ALIB_CALLER |
Debug Assertions, Warnings and Errors | |
The macros listed here are defined in two different versions, depending on the ALib distribution. With single ALib Modules that do not incorporate class aworx::lib::results::Report and family, namespace function aworx::lib::DbgSimpleALibMsg (and overloads) are used to write the messages. The default implementation of this message invokes assert(false) if the message is of error type. If class report is included in the selected ALib distribution, two things happen:
If also module ALox is compiled into the library, then a plug-in that uses ALox for the message output is used. See class ALoxReportWriter for more information. | |
#define | ALIB_ASSERT(cond) { if(!(cond)) ALIB_ERROR( "Assertion Failed" ); } |
#define | ALIB_ASSERT_ERROR(cond, ...) { if(!(cond)) ALIB_ERROR( __VA_ARGS__ ); } |
#define | ALIB_ASSERT_MESSAGE(cond, ...) { if(!(cond)) ALIB_MESSAGE( __VA_ARGS__ ); } |
#define | ALIB_ASSERT_RESULT_EQUALS( func, value) { auto result= func; assert(result == value); ((void) result); } |
#define | ALIB_ASSERT_RESULT_GREATER_THAN(func, value) { auto result= func; assert(result > value); ((void) result); } |
#define | ALIB_ASSERT_RESULT_LESS_THAN( func, value) { auto result= func; assert(result < value); ((void) result); } |
#define | ALIB_ASSERT_RESULT_NOT_EQUALS( func, value) { auto result= func; assert(result != value); ((void) result); } |
#define | ALIB_ASSERT_WARNING(cond, ...) { if(!(cond)) ALIB_WARNING( __VA_ARGS__ ); } |
#define | ALIB_ERROR(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 0, __VA_ARGS__); } |
#define | ALIB_MESSAGE(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 2, __VA_ARGS__); } |
#define | ALIB_WARNING(...) { aworx::lib::DbgSimpleALibMsg( ALIB_CALLER_PRUNED, 1, __VA_ARGS__); } |
Functions | |
ALIB_API void | DbgSimpleALibMsg (const char *file, int line, const char *method, int type, const char *topic, const char *msg, const int intValue) |
ALIB_API void | DbgSimpleALibMsg (const char *file, int line, const char *method, int type, const char *topic, const char *msg1=nullptr, const char *msg2=nullptr, const char *msg3=nullptr, const char *msg4=nullptr, const char *msg5=nullptr) |
This header file is part of the ALib C++ Library. It does neither belong to a fileset, nor to a specific module of ALib, but is included in any ALib Distribution.
© 2013-2023 A-Worx GmbH, Germany. Published under Boost Software License.
Definition in file tools.hpp.