A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ncbidbg_8hpp_source.html below:

NCBI C++ ToolKit: include/corelib/ncbidbg.hpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef CORELIB___NCBIDBG__HPP 2 #define CORELIB___NCBIDBG__HPP 42 #if defined(TEST_ASSERT__H) 43 # error "<common/test_assert.h> can not be included before this header" 51 #if defined(NCBI_COMPILER_MSVC) && defined(_DEBUG) 55 #ifdef __clang_analyzer__ 69 #define _ALWAYS_TRACE(message) \ 70  do if (NCBI_NS_NCBI::IsVisibleDiagPostLevel(NCBI_NS_NCBI::eDiag_Trace)) \ 71  { NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO, \ 72  NCBI_NS_NCBI::eDiag_Trace).GetRef() \ 73  << message << NCBI_NS_NCBI::Endm; } while (0) 75 #define _ALWAYS_TRACE_EX(err_code, err_subcode, message) \ 76  do if (NCBI_NS_NCBI::IsVisibleDiagPostLevel(NCBI_NS_NCBI::eDiag_Trace)) \ 77  { NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO, \ 78  NCBI_NS_NCBI::eDiag_Trace).GetRef() \ 79  << NCBI_NS_NCBI::ErrCode( (err_code), (err_subcode) ) \ 80  << message << NCBI_NS_NCBI::Endm; } while (0) 82 #define _ALWAYS_TRACE_X(err_subcode, message) \ 83  _ALWAYS_TRACE_XX(NCBI_USE_ERRCODE_X, err_subcode, message) 85 #define _ALWAYS_TRACE_XX(error_name, err_subcode, message) \ 86  do { (NCBI_CHECK_ERR_SUBCODE_X_NAME(error_name, err_subcode)); \ 87  _ALWAYS_TRACE_EX(NCBI_ERRCODE_X_NAME(error_name), err_subcode, message); } while (0) 89 #define NCBI_ALWAYS_TROUBLE(mess) \ 90  NCBI_NS_NCBI::CNcbiDiag::DiagTrouble(DIAG_COMPILE_INFO, mess) 92 #ifdef NCBI_COMPILER_MSVC 94 # define NCBI_ALWAYS_ASSERT(expr, mess) \ 96  bool x_expr = ((expr)? true : false); \ 98  const char* x_mess = (mess); \ 99  NCBI_NS_NCBI::CNcbiDiag(DIAG_COMPILE_INFO, \ 100  NCBI_NS_NCBI::eDiag_Error, \ 101  NCBI_NS_NCBI::eDPF_Trace) << \ 102  "Assertion failed: ("

<< \

103

(#expr ? #expr : "") << ") " << \

104

(x_mess ? x_mess : "") << NCBI_NS_NCBI::Endm; \

105

_ASSERT_BASE(x_expr, NULL); \

106

NCBI_NS_NCBI::CNcbiDiag::DiagAssertIfSuppressedSystemMessageBox( \

107

DIAG_COMPILE_INFO, #expr, x_mess); \

110 # define NCBI_ALWAYS_ASSERT_EXPR(expr, mess) \ 111  ((expr)?(void)0:NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess)) 113 # define NCBI_ALWAYS_ASSERT(expr, mess) \ 114  do { if ( !(expr) ) \ 115  NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess); \ 117 # define NCBI_ALWAYS_ASSERT_EXPR(expr, mess) \ 118  ((expr)?(void)0:NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess)) 121 #define NCBI_ALWAYS_VERIFY(expr, mess) NCBI_ALWAYS_ASSERT(expr, mess) 126 # define _TRACE(message) _ALWAYS_TRACE(message) 127 # define _TRACE_EX(err_code, err_subcode, message) \ 128  _ALWAYS_TRACE_EX(err_code, err_subcode, message) 129 # define _TRACE_X(err_subcode, message) _ALWAYS_TRACE_X(err_subcode, message) 130 # define _TRACE_XX(error_name, err_subcode, message) \ 131  _ALWAYS_TRACE_XX(error_name, err_subcode, message) 133 # define NCBI_TROUBLE(mess) NCBI_ALWAYS_TROUBLE(mess) 134 # define NCBI_ASSERT(expr, mess) NCBI_ALWAYS_ASSERT(expr, mess) 135 # define NCBI_ASSERT_EXPR(expr, mess) NCBI_ALWAYS_ASSERT_EXPR(expr, mess) 136 # define NCBI_VERIFY(expr, mess) NCBI_ALWAYS_VERIFY(expr, mess) 138 # define _DEBUG_ARG(arg) arg 140 # define _DEBUG_CODE(code) \ 141  do { code } while ( 0 ) 146 # define _TRACE(message) ((void)0) 147 # define _TRACE_EX(err_code, err_subcode, message) ((void)0) 148 # define _TRACE_X(err_subcode, message) ((void)0) 149 # define _TRACE_XX(error_name, err_subcode, message) ((void)0) 151 # define NCBI_TROUBLE(mess) 152 # define NCBI_ASSERT(expr, mess) ((void)0) 153 # define NCBI_ASSERT_EXPR(expr, mess) ((void)0) 154 # define NCBI_VERIFY(expr, mess) while ( expr ) break 155 # define _DEBUG_ARG(arg) 156 # define _DEBUG_CODE(code) ((void)0) 164 #define _ASSERT(expr) NCBI_ASSERT(expr, ""

)

165 #define _VERIFY(expr) NCBI_VERIFY(expr, ""

)

166 #define _TROUBLE NCBI_TROUBLE(""

)

168 #define _ALWAYS_ASSERT(expr) NCBI_ALWAYS_ASSERT(expr, ""

)

169 #define _ALWAYS_VERIFY(expr) NCBI_ALWAYS_VERIFY(expr, ""

)

170 #define _ALWAYS_TROUBLE NCBI_ALWAYS_TROUBLE(""

)

173 #ifdef __clang_analyzer__ 175 # define _ASSERT(expr) assert(expr) 206 # define CHECKME_VALIDATE(condition, error_type) \ 207  do { if ( !(condition) ) \ 208  xncbi_CCheckMe_ReportError(error_type); \ 211 # define CHECKME_VALIDATE(condition, error_type) ((void)0) 229 template

<

typename

TValue>

245  t

.m_IsChecked =

true

;

261  t

.m_IsChecked =

true

;

285  t

.m_IsChecked =

true

;

293  t

.m_IsChecked =

true

;

297  template

<

typename

T>

305  template

<

typename

T>

314  operator

TValue(

void

)

const 332 #undef CHECKME_VALIDATE 338 #ifdef HAVE_NCBI_SKEW_GUARD 339 #include <common/ncbi_source_ver.cmake_nodep> 340 #define NAME_NCBI_LIBRARY_VERSION_MISMATCH(a) Ncbi_library_version_mismatch__Full_rebuild_to_fix_##a 341 #define MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH(a) NAME_NCBI_LIBRARY_VERSION_MISMATCH(a) 342 #define CHECK_NCBI_LIBRARY_VERSION_MISMATCH MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH(NCBI_DEVELOPMENT_VER)

Wrapper around an object of type TValue, that makes it mandatory to check object value somehow after ...

EValidateAction

Which action to perform.

static NCBI_UNUSED int s__check_ncbi_library_version_mismatch

void SetChecked(bool is_checked=true) const

Force-set to the "checked" state.

CCheckMe(const CCheckMe &t)

bool operator==(const CCheckMe &t) const

bool operator!=(const CCheckMe &t) const

void xncbi_SetValidateAction(EValidateAction action)

Set the action to be performed.

bool IsChecked(void) const

void xncbi_CCheckMe_ReportError(ECheckMeError error)

CCheckMe(const TValue &val)

CCheckMe & operator=(const CCheckMe &t)

Assignment.

EValidateAction xncbi_GetValidateAction(void)

Get the action to be performed.

#define CHECK_NCBI_LIBRARY_VERSION_MISMATCH

#define CHECKME_VALIDATE(condition, error_type)

@ eValidate_Throw

Throw an exception if not valid.

@ eValidate_Abort

abort() if not valid

@ eValidate_Default

Default action.

@ eCheckMe_Unused

The value has not been checked.

@ eCheckMe_Unset

Invalid op with a not set value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define NCBI_XNCBI_EXPORT

const GenericPointer< typename T::ValueType > T2 value

Defines NCBI C++ diagnostic APIs, classes, and macros.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4