7 #ifndef __IPDEBUG_HPP__ 8 #define __IPDEBUG_HPP__ 13 #ifndef IPOPT_CHECKLEVEL 14 #define IPOPT_CHECKLEVEL 0 17 #if IPOPT_CHECKLEVEL > 0 22 # define DBG_ASSERT(test) assert(test) 23 # define DBG_ASSERT_EXCEPTION(__condition, __except_type, __msg) \ 24 ASSERT_EXCEPTION( (__condition), __except_type, __msg); 25 # define DBG_DO(__cmd) __cmd 27 # define DBG_ASSERT(test) 28 # define DBG_ASSERT_EXCEPTION(__condition, __except_type, __msg) 29 # define DBG_DO(__cmd) 32 #ifndef IPOPT_VERBOSITY 33 #define IPOPT_VERBOSITY 0 36 #if IPOPT_VERBOSITY < 1 37 # define DBG_START_FUN(__func_name, __verbose_level) 38 # define DBG_START_METH(__func_name, __verbose_level) 39 # define DBG_PRINT(__printf_args) 40 # define DBG_PRINT_VECTOR(__verbose_level, __vec_name, __vec) 41 # define DBG_PRINT_MATRIX(__verbose_level, __mat_name, __mat) 42 # define DBG_EXEC(__verbosity, __cmd) 43 # define DBG_VERBOSITY() 0 63 DebugJournalistWrapper(
65 const std::string& func_name,
69 DebugJournalistWrapper(
70 const std::string& func_name,
72 const void*
const method_owner
74 ~DebugJournalistWrapper();
81 return verbose_level_;
83 const Journalist* Jnlst()
87 Index IndentationLevel()
89 return indentation_level_;
95 __attribute__((format(printf, 3, 4)))
104 friend class IpoptApplication;
111 static void SetJournalist(
126 DebugJournalistWrapper();
129 DebugJournalistWrapper(
130 const DebugJournalistWrapper&
134 DebugJournalistWrapper& operator=(
135 const DebugJournalistWrapper&
139 static Index indentation_level_;
140 std::string func_name_;
141 Index verbose_level_;
142 const void* method_owner_;
144 static Journalist* jrnl_;
148 # define DBG_START_FUN(__func_name, __verbose_level) \ 149 DebugJournalistWrapper dbg_jrnl((__func_name), (__verbose_level)); \ 151 # define DBG_START_METH(__func_name, __verbose_level) \ 152 DebugJournalistWrapper dbg_jrnl((__func_name), (__verbose_level), this); 154 # define DBG_PRINT(__args) \ 155 dbg_jrnl.DebugPrintf __args; 157 # define DBG_EXEC(__verbose_level, __cmd) \ 158 if (dbg_jrnl.Verbosity() >= (__verbose_level)) { \ 162 # define DBG_VERBOSITY() \
ipindex Index
Type of all indices of vectors, matrices etc.
This file contains a base class for all exceptions and a set of macros to help with exceptions...