BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Nef_2/debug.h
Go to the documentation of this file.
00001 // Copyright (c) 2000  Max-Planck-Institute Saarbruecken (Germany).
00002 // All rights reserved.
00003 //
00004 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License as
00006 // published by the Free Software Foundation; version 2.1 of the License.
00007 // See the file LICENSE.LGPL distributed with CGAL.
00008 //
00009 // Licensees holding a valid commercial license may use this file in
00010 // accordance with the commercial license agreement provided with the software.
00011 //
00012 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014 //
00015 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Nef_2/include/CGAL/Nef_2/debug.h $
00016 // $Id: debug.h 41558 2008-01-12 21:08:22Z spion $
00017 // 
00018 //
00019 // Author(s)     : Michael Seel <seel@mpi-sb.mpg.de>
00020 
00021 #ifndef CGAL_NEF_2_DEBUG_H
00022 #define CGAL_NEF_2_DEBUG_H
00023 
00024 #include <iostream>
00025 
00026 #ifdef NDEBUG
00027 #undef CGAL_NEF_DEBUG
00028 #define CGAL_NEF_DEBUG 1
00029 #endif
00030 
00031 #ifndef CGAL_NEF_DEBUG
00032 #define CGAL_NEF_DEBUG 1
00033 #endif
00034 
00035 #ifndef NDEBUG
00036   static int debugthread=1;
00037 #endif
00038 
00039 #undef CGAL_NEF_TRACE
00040 #undef CGAL_NEF_TRACEN
00041 #undef CGAL_NEF_TRACEV
00042 #undef CGAL_NEF_CTRACE
00043 #undef CGAL_NEF_CTRACEN
00044 #undef CGAL_NEF_SETDTHREAD
00045 
00046 #ifndef NDEBUG
00047 #define CGAL_NEF_SETDTHREAD(l) debugthread=l
00048 #else
00049 #define CGAL_NEF_SETDTHREAD(l)
00050 #endif
00051 
00052 #ifndef NDEBUG
00053 #define CGAL_NEF_TRACE(t) if((debugthread%CGAL_NEF_DEBUG)==0) \
00054  std::cerr<<" "<<t; \
00055  std::cerr.flush()
00056 #else
00057 #define CGAL_NEF_TRACE(t) 
00058 #endif
00059 
00060 #ifndef NDEBUG
00061 #define CGAL_NEF_TRACEV(t) if((debugthread%CGAL_NEF_DEBUG)==0) \
00062  std::cerr<<" "<<#t<<" = "<<(t)<<std::endl; \
00063  std::cerr.flush()
00064 #else
00065 #define CGAL_NEF_TRACEV(t) 
00066 #endif
00067 
00068 #ifndef NDEBUG
00069 #define CGAL_NEF_TRACEN(t) if((debugthread%CGAL_NEF_DEBUG)==0) \
00070  std::cerr<< " "<<t<<std::endl; \
00071  std::cerr.flush()
00072 #else
00073 #define CGAL_NEF_TRACEN(t)
00074 #endif
00075 
00076 #ifndef NDEBUG
00077 #define CGAL_NEF_CTRACE(b,t) if(b) std::cerr<<" "<<t; else std::cerr<<" 0"
00078 #else
00079 #define CGAL_NEF_CTRACE(b,t) 
00080 #endif
00081 
00082 #ifndef NDEBUG
00083 #define CGAL_NEF_CTRACEN(b,t) if(b) std::cerr<<" "<<t<<"\n"; else std::cerr<<" 0\n"
00084 #else
00085 #define CGAL_NEF_CTRACEN(b,t) 
00086 #endif
00087 
00088 #endif // CGAL_NEF_2_DEBUG_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines