00001 //###################################################################### 00002 // 00003 // GraspIt! 00004 // Copyright (C) 2002-2009 Columbia University in the City of New York. 00005 // All rights reserved. 00006 // 00007 // GraspIt! 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 // GraspIt! is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GraspIt!. If not, see <http://www.gnu.org/licenses/>. 00019 // 00020 // Author(s): Matei T. Ciocarlie 00021 // 00022 // $Id: debug.h,v 1.9 2009/03/30 14:59:55 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00040 #ifndef _DEBUG_H_ 00041 #define _DEBUG_H_ 00042 00043 #include <iostream> 00044 00045 #ifdef GRASPITDBG 00046 #define DBGP(STMT) std::cerr<<STMT<<std::endl; 00047 #define DBGST(STMT) STMT; 00048 #else 00049 #define DBGP(STMT) 00050 #define DBGST(STMT) 00051 #endif 00052 00053 #define DBGA(STMT) std::cerr<<STMT<<std::endl; 00054 00055 #define PRINT_STAT(STREAM_PTR,STMT) if (STREAM_PTR) *STREAM_PTR << STMT << " "; 00056 #define DBGAF(STREAM,STMT) {STREAM<<STMT<<std::endl; DBGA(STMT)} 00057 #define DBGPF(STREAM,STMT) {STREAM<<STMT<<std::endl; DBGP(STMT)} 00058 00059 #endif