Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

glassert.h

00001 /***************************************************************************
00002                           glassert.h  -  description
00003                              -------------------
00004     begin                : Thu Jul 17 2003
00005     copyright            : (C) 2003 by Jacques Gasselin de Richebourg
00006     email                : jacquesgasselin@hotmail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef GLASSERT_H
00018 #define GLASSERT_H
00019 
00020 #include <iostream>
00021 
00022 //triggered if bool is false
00023 void GLAssert(bool, const char*);
00024 
00025 #define TESTING_STREAM std::cout
00026 #define ASSERTION_STREAM std::cerr
00027 
00028 
00029 #define TYPE_NAME(tn) \
00030    virtual const char* getType() { return #tn; }
00031 /*
00032 #define SML_TAG(stag, etag) \
00033    static const char* getStartTag() { return stag; } \
00034    static const char* getEndTag() { return etag; }
00035 */
00036 
00037 #ifdef TESTING
00038    #define TEST_FUNC(a) a
00039 #else
00040    #define TEST_FUNC(a)
00041 #endif
00042 
00043 #ifdef TESTING
00044    #define PRINT(a) TESTING_STREAM<< a <<std::endl;
00045 #else
00046    #define PRINT(a)
00047 #endif
00048 
00049 #ifdef DEBUG
00050    #define customAssert(a,b) GLAssert( ((a)) , ((b)) );
00051 #else
00052    #define customAssert(a,b)
00053 #endif
00054 
00055 #ifdef DEBUG
00056    #define DEBUG_PRINT(debug_string) std::cerr<< debug_string <<std::endl;
00057 #else
00058    #define DEBUG_PRINT(debug_string)
00059 #endif
00060 
00061 
00062 #endif

Generated on Wed Feb 4 23:11:33 2004 by doxygen 1.3.3