2009-01-13 18:58:07 +00:00
|
|
|
/** @file aiAssert.h
|
|
|
|
*/
|
2008-05-05 12:36:31 +00:00
|
|
|
#ifndef AI_DEBUG_H_INC
|
|
|
|
#define AI_DEBUG_H_INC
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#error This header requires C++ to be used.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace Assimp {
|
|
|
|
|
2009-07-31 22:34:21 +00:00
|
|
|
//! \brief ASSIMP specific assertion test, only works in debug mode
|
2008-05-05 12:36:31 +00:00
|
|
|
//! \param uiLine Line in file
|
|
|
|
//! \param file Source file
|
2010-02-05 22:32:19 +00:00
|
|
|
AI_WONT_RETURN void aiAssert(const std::string &message, unsigned int uiLine, const std::string &file);
|
2008-05-05 12:36:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
//! \def ai_assert
|
2010-02-05 22:32:19 +00:00
|
|
|
//! \brief ASSIMP specific assertion test
|
2008-05-05 12:36:31 +00:00
|
|
|
#ifdef DEBUG
|
2010-01-06 22:04:31 +00:00
|
|
|
# define ai_assert(expression) if( !(expression)) Assimp::aiAssert( #expression, __LINE__, __FILE__);
|
2008-05-05 12:36:31 +00:00
|
|
|
#else
|
|
|
|
# define ai_assert(expression)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // Namespace Assimp
|
|
|
|
|
|
|
|
#endif
|