NCBI C++ ToolKit
|
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 } |
#define _ALWAYS_ASSERT | ( | expr | ) | NCBI_ALWAYS_ASSERT(expr, "") |
Definition at line 164 of file ncbidbg.hpp.
#define _ALWAYS_TRACE | ( | message | ) |
Define macros to support debugging.
Definition at line 65 of file ncbidbg.hpp.
#define _ALWAYS_TRACE_EX | ( | err_code, | |
err_subcode, | |||
message | |||
) |
Definition at line 71 of file ncbidbg.hpp.
#define _ALWAYS_TRACE_X | ( | err_subcode, | |
message | |||
) | _ALWAYS_TRACE_XX(NCBI_USE_ERRCODE_X, err_subcode, message) |
Definition at line 78 of file ncbidbg.hpp.
#define _ALWAYS_TRACE_XX | ( | error_name, | |
err_subcode, | |||
message | |||
) |
Definition at line 81 of file ncbidbg.hpp.
#define _ALWAYS_TROUBLE NCBI_ALWAYS_TROUBLE("") |
Definition at line 166 of file ncbidbg.hpp.
#define _ALWAYS_VERIFY | ( | expr | ) | NCBI_ALWAYS_VERIFY(expr, "") |
Definition at line 165 of file ncbidbg.hpp.
#define _ASSERT | ( | expr | ) | NCBI_ASSERT(expr, "") |
Definition at line 160 of file ncbidbg.hpp.
#define _DEBUG_ARG | ( | arg | ) | arg |
Definition at line 134 of file ncbidbg.hpp.
Definition at line 136 of file ncbidbg.hpp.
#define _TRACE | ( | message | ) | _ALWAYS_TRACE(message) |
Definition at line 122 of file ncbidbg.hpp.
#define _TRACE_EX | ( | err_code, | |
err_subcode, | |||
message | |||
) | _ALWAYS_TRACE_EX(err_code, err_subcode, message) |
Definition at line 123 of file ncbidbg.hpp.
#define _TRACE_X | ( | err_subcode, | |
message | |||
) | _ALWAYS_TRACE_X(err_subcode, message) |
Definition at line 125 of file ncbidbg.hpp.
#define _TRACE_XX | ( | error_name, | |
err_subcode, | |||
message | |||
) | _ALWAYS_TRACE_XX(error_name, err_subcode, message) |
Definition at line 126 of file ncbidbg.hpp.
#define _TROUBLE NCBI_TROUBLE("") |
Definition at line 162 of file ncbidbg.hpp.
#define _VERIFY | ( | expr | ) | NCBI_VERIFY(expr, "") |
Definition at line 161 of file ncbidbg.hpp.
#define CHECK_NCBI_LIBRARY_VERSION_MISMATCH | ( | void | ) | MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH(NCBI_DEVELOPMENT_VER) |
Definition at line 333 of file ncbidbg.hpp.
#define CHECKME_VALIDATE | ( | condition, | |
error_type | |||
) |
Definition at line 197 of file ncbidbg.hpp.
#define MAKENAME_NCBI_LIBRARY_VERSION_MISMATCH | ( | a | ) | NAME_NCBI_LIBRARY_VERSION_MISMATCH(a) |
Definition at line 332 of file ncbidbg.hpp.
#define NAME_NCBI_LIBRARY_VERSION_MISMATCH | ( | a | ) | Ncbi_library_version_mismatch__Full_rebuild_to_fix_##a |
Definition at line 331 of file ncbidbg.hpp.
#define NCBI_ALWAYS_ASSERT | ( | expr, | |
mess | |||
) |
Definition at line 109 of file ncbidbg.hpp.
#define NCBI_ALWAYS_ASSERT_EXPR | ( | expr, | |
mess | |||
) | ((expr)?(void)0:NCBI_NS_NCBI::CNcbiDiag::DiagAssert(DIAG_COMPILE_INFO, #expr, mess)) |
Definition at line 113 of file ncbidbg.hpp.
#define NCBI_ALWAYS_TROUBLE | ( | mess | ) | NCBI_NS_NCBI::CNcbiDiag::DiagTrouble(DIAG_COMPILE_INFO, mess) |
Definition at line 85 of file ncbidbg.hpp.
#define NCBI_ALWAYS_VERIFY | ( | expr, | |
mess | |||
) | NCBI_ALWAYS_ASSERT(expr, mess) |
Definition at line 117 of file ncbidbg.hpp.
#define NCBI_ASSERT | ( | expr, | |
mess | |||
) | NCBI_ALWAYS_ASSERT(expr, mess) |
Definition at line 130 of file ncbidbg.hpp.
#define NCBI_ASSERT_EXPR | ( | expr, | |
mess | |||
) | NCBI_ALWAYS_ASSERT_EXPR(expr, mess) |
Definition at line 131 of file ncbidbg.hpp.
#define NCBI_TROUBLE | ( | mess | ) | NCBI_ALWAYS_TROUBLE(mess) |
Definition at line 129 of file ncbidbg.hpp.
#define NCBI_VERIFY | ( | expr, | |
mess | |||
) | NCBI_ALWAYS_VERIFY(expr, mess) |
Definition at line 132 of file ncbidbg.hpp.
enum ECheckMeError |
Enumerator | |
---|---|
eCheckMe_Unused | The value has not been checked. |
eCheckMe_Unset | Invalid op with a not set value. |
Definition at line 191 of file ncbidbg.hpp.
enum EValidateAction |
Which action to perform.
Specify action to be performed when expression under "xncbi_Validate(expr, ...)" evaluates to FALSE.
Enumerator | |
---|---|
eValidate_Default | Default action. |
eValidate_Abort | abort() if not valid |
eValidate_Throw | Throw an exception if not valid. |
Definition at line 173 of file ncbidbg.hpp.
Definition at line 233 of file ncbidbg.hpp.
References t.
Definition at line 229 of file ncbidbg.hpp.
Definition at line 225 of file ncbidbg.hpp.
Definition at line 312 of file ncbidbg.hpp.
References CCheckMe< TValue >::m_IsChecked.
int Ncbi_library_version_mismatch__Full_rebuild_to_fix_NCBI_DEVELOPMENT_VER | ( | void | ) |
|
inline |
Conversion to value type.
Definition at line 305 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unset, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, and CCheckMe< TValue >::m_Value.
|
inline |
Definition at line 280 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unset, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and t.
|
inline |
Definition at line 297 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unset, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and t.
|
inline |
Assignment.
Definition at line 246 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unused, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and t.
Definition at line 256 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unused, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and value.
|
inline |
Definition at line 272 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unset, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and t.
|
inline |
Definition at line 289 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unset, CCheckMe< TValue >::m_IsChecked, CCheckMe< TValue >::m_IsSet, CCheckMe< TValue >::m_Value, and t.
|
inline |
Force-set to the "checked" state.
Definition at line 266 of file ncbidbg.hpp.
References CCheckMe< TValue >::m_IsChecked.
void xncbi_CCheckMe_ReportError | ( | ECheckMeError | error | ) |
Definition at line 87 of file ncbidbg.cpp.
References eCheckMe_Unused, and NCBI_TROUBLE.
EValidateAction xncbi_GetValidateAction | ( | void | ) |
Get the action to be performed.
Definition at line 65 of file ncbidbg.cpp.
References eValidate_Abort, eValidate_Default, eValidate_Throw, and s_ValidateTLS.
Referenced by CNcbiDiag::DiagValidate().
void xncbi_SetValidateAction | ( | EValidateAction | action | ) |
Set the action to be performed.
Definition at line 59 of file ncbidbg.cpp.
References s_ValidateTLS.
Definition at line 240 of file ncbidbg.hpp.
References CHECKME_VALIDATE, eCheckMe_Unused, and CCheckMe< TValue >::m_IsChecked.
Definition at line 320 of file ncbidbg.hpp.
Referenced by CCheckMe< TValue >::IsChecked(), CCheckMe< TValue >::operator TValue(), CCheckMe< TValue >::operator!=(), CCheckMe< TValue >::operator=(), CCheckMe< TValue >::operator==(), CCheckMe< TValue >::SetChecked(), and CCheckMe< TValue >::~CCheckMe().
Definition at line 319 of file ncbidbg.hpp.
Referenced by CCheckMe< TValue >::operator TValue(), CCheckMe< TValue >::operator!=(), CCheckMe< TValue >::operator=(), and CCheckMe< TValue >::operator==().
|
private |
Definition at line 318 of file ncbidbg.hpp.
Referenced by CCheckMe< TValue >::operator TValue(), CCheckMe< TValue >::operator!=(), CCheckMe< TValue >::operator=(), and CCheckMe< TValue >::operator==().
|
static |
Definition at line 336 of file ncbidbg.hpp.