Debug.h

Go to the documentation of this file.
00001 
00006 /* Copyright © 2009 James Legg.
00007     This program is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 */
00012 
00013 #ifndef DEBUG_H_
00014 #define DEBUG_H_
00015 
00016 #include <cassert>
00017 #include <iostream>
00018 #ifdef NDEBUG
00019     // no-op for release build
00020     #define DEBUG_MESSAGE( text )
00021 #else
00022     #include <iostream> 
00023     #define DEBUG_MESSAGE( text ) \
00024         std::cout << "Debug message: (from " __FILE__ ":" << __LINE__ << ") "\
00025                   << text << std::endl
00026 #endif
00027 
00028 // hopefully this won't get into the release build, but would still be useful.
00029 #define PRINT_STUB_MESSAGE \
00030     std::cout << "Not implemented yet: " __FILE__ ":" << __LINE__ << std::endl
00031 
00032 // a build time macro for versioning.
00033 #define BUILD_TIME __DATE__ __TIME__
00034  
00035 #endif /*DEBUG_H_*/

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:11 2010 by Doxygen version 1.4.7 for Racer version svn335.