Go to the documentation of this file.
34 #include <itpp/itexports.h>
69 ITPP_EXPORT
void it_assert_f(std::string ass, std::string msg, std::string file,
int line);
71 ITPP_EXPORT
void it_error_f(std::string msg, std::string file,
int line);
73 ITPP_EXPORT
void it_info_f(std::string msg);
75 ITPP_EXPORT
void it_warning_f(std::string msg, std::string file,
int line);
94 #define it_assert(t,s) \
96 std::ostringstream m_sout; \
98 itpp::it_assert_f(#t,m_sout.str(),__FILE__,__LINE__); \
103 # define it_assert_debug(t,s) ((void) (t))
106 # define it_assert_debug(t,s) it_assert(t,s)
108 #endif // if defined(NDEBUG)
111 #define it_assert0(t,s) it_assert_debug(t,s)
112 #define it_assert1(t,s) it_assert_debug(t,s)
117 #define it_error_if(t,s) \
119 std::ostringstream m_sout; \
121 itpp::it_error_f(m_sout.str(),__FILE__,__LINE__); \
126 #define it_error(s) \
128 std::ostringstream m_sout; \
130 itpp::it_error_f(m_sout.str(),__FILE__,__LINE__); \
138 std::ostringstream m_sout; \
139 m_sout << s << std::endl; \
140 itpp::it_info_f(m_sout.str()); \
145 #define it_info_no_endl(s) \
147 std::ostringstream m_sout; \
149 itpp::it_info_f(m_sout.str()); \
154 # define it_info_debug(s) ((void) 0)
160 # define it_info_no_endl_debug(s) ((void) 0)
162 # define it_info_debug(s) it_info(s)
168 # define it_info_no_endl_debug(s) it_info_no_endl(s)
169 #endif // if defined(NDEBUG)
173 #define it_warning(s) \
175 std::ostringstream m_sout; \
177 itpp::it_warning_f(m_sout.str(),__FILE__,__LINE__); \
185 #endif // #ifndef ITASSERT_H
void it_error_msg_style(error_msg_style style)
Set preferred style of assert, error and warning messages.
void it_redirect_warnings(std::ostream *warn_stream)
Redirect warnings to the ostream warn_stream.
void it_error_f(std::string msg, std::string file, int line)
Helper function for the it_error and it_error_if macros.
void it_info_f(std::string msg)
Helper function for the it_info and it_info_debug macros.
ITPP_EXPORT void it_enable_exceptions(bool on)
Enable/disable using exceptions for error handling.
void it_disable_warnings()
Disable warnings.
error_msg_style
Style of assert, error and warning messages.
void it_assert_f(std::string ass, std::string msg, std::string file, int line)
Helper function for the it_assert and it_assert_debug macros.
void it_warning_f(std::string msg, std::string file, int line)
Helper function for the it_warning macro.
void it_enable_warnings()
Enable warnings.
Generated on Sat Jun 22 2019 19:10:12 for IT++ by Doxygen 1.8.17