additional/debug/debug.h

Go to the documentation of this file.
00001 #ifndef _DEBUG_H_
00002 #define _DEBUG_H_
00003 #include <stdio.h>
00004 
00005 class VectorN;
00006 class Vector4;
00007 class Matrixmxn;
00008 class Matrix4x4;
00009 class Configuration;
00010 class PA_Points;
00011 
00012 //print out a message in debug mode
00013 void DebugMessage( const char* message );
00014 
00015 //Log a message into a file
00016 //#ifdef _DEBUG
00017         void Log(char *fileName, char *format, ...);
00018         void LogVector(char *fileName, VectorN &vec, char *szMsg=NULL);
00019         void LogVector(char *fileName, Vector4 &vec, char *szMsg=NULL);
00020         void LogMatrix(char *fileName, Matrixmxn &matrix, char *szMsg=NULL);
00021         void LogMatrix(char *fileName, Matrix4x4 &matrix, char *szMsg=NULL);
00022         void LogMessage(char *fileName, char *szMsg);
00023         void LogConfiguration(char *fileName, Configuration &config);
00024         void LogPath(char *fileName, PA_Points &path);
00025 //#else
00026 //      #define Log(a, b) 
00027 //#endif
00028 
00029 #define IJG_Assert( x ) if( !( x ) ) { DebugMessage( "ASSERT FAILED - " #x "\n" ); _asm{ int 3 }; }
00030 #define IJG_AssertMsg( x, msg ) if( !( x ) ) { DebugMessage( "ASSERT FAILED - " #x "\n" ); DebugMessage( msg ); _asm{ int 3 }; }
00031 
00032 //kick the compiler out to the debugger
00033 #define KickOut() _asm{ int 3 }
00034 
00035 #endif

Generated on Sat Apr 1 21:30:30 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO