NCBI C++ ToolKit
Classes | Macros | Enumerations | Functions | Variables
ncbidbg.hpp File Reference

NCBI C++ auxiliary debug macros. More...

#include <corelib/ncbidiag.hpp>
#include <common/ncbi_source_ver.cmake_nodep>
+ Include dependency graph for ncbidbg.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CCheckMe< TValue >
 Wrapper around an object of type TValue, that makes it mandatory to check object value somehow after each assignment. More...
 

Macros

#define _ALWAYS_TRACE(message)
 Define macros to support debugging. More...
 
#define _ALWAYS_TRACE_EX(err_code, err_subcode, message)
 
#define _ALWAYS_TRACE_X(err_subcode, message)    _ALWAYS_TRACE_XX(NCBI_USE_ERRCODE_X, err_subcode, message)
 
#define _ALWAYS_TRACE_XX(error_name, err_subcode, message)
 
#define NCBI_ALWAYS_TROUBLE(mess)    NCBI_NS_NCBI::CNcbiDiag::DiagTrouble(DIAG_COMPILE_INFO, mess)
 
#define NCBI_ALWAYS_ASSERT(expr, mess)
 
#define NCBI_ALWAYS_ASSERT_EXPR(expr, mess)    ((expr)?(void)0:NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess))
 
#define NCBI_ALWAYS_VERIFY(expr, mess)   NCBI_ALWAYS_ASSERT(expr, mess)
 
#define _TRACE(message)   _ALWAYS_TRACE(message)
 
#define _TRACE_EX(err_code, err_subcode, message)    _ALWAYS_TRACE_EX(err_code, err_subcode, message)
 
#define _TRACE_X(err_subcode, message)   _ALWAYS_TRACE_X(err_subcode, message)
 
#define _TRACE_XX(error_name, err_subcode, message)    _ALWAYS_TRACE_XX(error_name, err_subcode, message)
 
#define NCBI_TROUBLE(mess)   NCBI_ALWAYS_TROUBLE(mess)
 
#define NCBI_ASSERT(expr, mess)   NCBI_ALWAYS_ASSERT(expr, mess)
 
#define NCBI_ASSERT_EXPR(expr, mess)   NCBI_ALWAYS_ASSERT_EXPR(expr, mess)
 
#define NCBI_VERIFY(expr, mess)   NCBI_ALWAYS_VERIFY(expr, mess)
 
#define _DEBUG_ARG(arg)   arg
 
#define _DEBUG_CODE(code)    do { code } while ( 0 )
 
#define _ASSERT(expr)   NCBI_ASSERT(expr, "")
 
#define _VERIFY(expr)   NCBI_VERIFY(expr, "")
 
#define _TROUBLE   NCBI_TROUBLE("")
 
#define _ALWAYS_ASSERT(expr)   NCBI_ALWAYS_ASSERT(expr, "")
 
#define _ALWAYS_VERIFY(expr)   NCBI_ALWAYS_VERIFY(expr, "")
 
#define _ALWAYS_TROUBLE   NCBI_ALWAYS_TROUBLE("")
 
#define CHECKME_VALIDATE(condition, error_type)
 
#define NAME_NCBI_LIBRARY_VERSION_MISMATCH(a)   Ncbi_library_version_mismatch__Full_rebuild_to_fix_##a
 
#define MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH(a)   NAME_NCBI_LIBRARY_VERSION_MISMATCH(a)
 
#define CHECK_NCBI_LIBRARY_VERSION_MISMATCH   MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH(NCBI_DEVELOPMENT_VER)
 

Enumerations

enum  EValidateAction { eValidate_Default = 0 , eValidate_Abort , eValidate_Throw }
 Which action to perform. More...
 
enum  ECheckMeError { eCheckMe_Unused , eCheckMe_Unset }
 

Functions

void xncbi_SetValidateAction (EValidateAction action)
 Set the action to be performed. More...
 
EValidateAction xncbi_GetValidateAction (void)
 Get the action to be performed. More...
 
void xncbi_CCheckMe_ReportError (ECheckMeError error)
 
int Ncbi_library_version_mismatch__Full_rebuild_to_fix_NCBI_DEVELOPMENT_VER (void)
 

Variables

static NCBI_UNUSED int s__check_ncbi_library_version_mismatch = Ncbi_library_version_mismatch__Full_rebuild_to_fix_NCBI_DEVELOPMENT_VER ()
 

Detailed Description

NCBI C++ auxiliary debug macros.

NOTE:These macros are NOT for use in test applications!!! Test applications must use normal assert() and must include <common/test_assert.h> as a last header file. [test apps in 'connect' branch include "test/test_assert.h" instead]

Definition in file ncbidbg.hpp.

Modified on Sun Apr 21 03:42:26 2024 by modify_doxy.py rev. 669887