00001 // vim:syntax=cpp.doxygen tw=3 sw=3 00002 /*************************************************************************** 00003 * Copyright (C) 2008 by Brice Boyer * 00004 * brice.boyer@ens-lyon.org * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program; if not, write to the * 00018 * Free Software Foundation, Inc., * 00019 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00020 ***************************************************************************/ 00021 00029 #ifndef __outils_base_h 00030 #define __outils_base_h 1 00031 00032 #include "type_base.h" 00033 00034 #include <iostream> 00035 00036 /* 00037 // # ifdef NDEBUG 00038 // # if _DEBUG0 00040 // # define cinfo( niveau, test, tab, info) \ 00041 // if (true) (static_cast<void > (0)) ; \ 00042 // else \ 00043 // std::cout 00045 // # define cblock(niveau,test,errnum,msg) \ 00046 // (static_cast<void > (0)) 00047 // 00048 // # else // debug 00049 */ 00050 00052 #define cinfo(niveau,test,tab,info) \ 00053 if (!(niveau)) \ 00054 static_cast<void > (0) ; \ 00055 else \ 00056 if (test) {for (int jj = 0 ; jj < (tab) ; ++jj) {std::cout << '\t';}} \ 00057 if (!(niveau) || !(test)) \ 00058 static_cast<void > (0) ; \ 00059 else \ 00060 std::cout << (info) << ' ' 00061 00063 #define cblock(niveau,test,errnum,msg) \ 00064 if (!(niveau) || !(test)) \ 00065 static_cast<void > (0) ; \ 00066 else \ 00067 { msg << _erreur << " dans le fichier "<< __FILE__ << " à la ligne " << __LINE__ << "(dans la fonction "<<__PRETTY_FUNCTION__ << ")" << std::endl; exit(errnum);} 00068 00069 //#endif // debogage 00070 00071 std::string LaReponse ( const bool & rep ) ; 00072 std::string LaParente ( const relatif_type & num ) ; 00073 std::string