00001 /*===========================================================================*\ 00002 * * 00003 * OpenMesh * 00004 * Copyright (C) 2001-2003 by Computer Graphics Group, RWTH Aachen * 00005 * www.openmesh.org * 00006 * * 00007 *---------------------------------------------------------------------------* 00008 * * 00009 * License * 00010 * * 00011 * This library is free software; you can redistribute it and/or modify it * 00012 * under the terms of the GNU Library General Public License as published * 00013 * by the Free Software Foundation, version 2. * 00014 * * 00015 * This library is distributed in the hope that it will be useful, but * 00016 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00018 * Library General Public License for more details. * 00019 * * 00020 * You should have received a copy of the GNU Library General Public * 00021 * License along with this library; if not, write to the Free Software * 00022 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00023 * * 00024 \*===========================================================================*/ 00025 00026 //============================================================================= 00027 // 00028 // OpenMesh streams: omlog, omout, omerr 00029 // 00030 //============================================================================= 00031 00032 #ifndef OPENMESH_OMSTREAMS_HH 00033 #define OPENMESH_OMSTREAMS_HH 00034 00035 00036 //== INCLUDES ================================================================= 00037 00038 #include <OpenMesh/Core/System/mostream.hh> 00039 00040 00041 //== CLASS DEFINITION ========================================================= 00042 00043 00044 // do not put these into namespace OpenMesh (for convenience) 00045 extern OpenMesh::mostream omlog, omout, omerr; 00046 00047 #ifndef DOXY_IGNORE_THIS 00048 00049 namespace OpenMesh 00050 { 00051 struct __InitMultiplexStreams 00052 { 00053 struct Initializer 00054 { 00055 Initializer() 00056 { 00057 omlog.connect(std::clog); 00058 omout.connect(std::cout); 00059 omerr.connect(std::cerr); 00060 #ifdef NDEBUG 00061 omlog.disable(); 00062 #endif 00063 } 00064 }; 00065 static Initializer init_multiplex_streams; 00066 }; 00067 } 00068 00069 #endif 00070 00071 //============================================================================= 00072 #endif // OPENMESH_OMSTREAMS_HH defined 00073 //============================================================================= 00074