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__); \
104 # define it_assert_debug(t,s) ((void) (t))
107 # 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)
113 #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()); \
155 # define it_info_debug(s) ((void) 0)
160 # define it_info_no_endl_debug(s) ((void) 0)
163 # 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