www.pudn.com > Gimcrack-v0.0051-Source.zip > assert.h


/******************************************************************** 
	created:		? 
	author:			Steve Rabin, Game Programming Gems 
	copyright:		Copyright 2003 (C) Steve Rabin 
	description:	Assert function 
*********************************************************************/ 
 
#ifndef _ASSERT_H_ 
#define _ASSERT_H_ 
#include  
#include  
#include  
 
#ifdef _DEBUG 
extern bool _DebugAssert( int expression, char * description, int line, char * file, bool & ignoreAlways ); 
 
#define assertex( exp ) \ 
   {  static bool ignoreAlways = false; \ 
		if( !ignoreAlways ) \ 
		{ \ 
			if( _DebugAssert( (int)(exp), #exp, __LINE__, __FILE__, ignoreAlways ) ) \ 
			{ _asm { int 3 } } \ 
		} \ 
   } 
 
#else 
#define assertex( exp ) 
#endif  
 
 
 
#endif /* _ASSERT_H_ */