Tracer.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2007-2008 Anael Orlinski
00003 *
00004 * This file is part of Panomatic.
00005 *
00006 * Panomatic 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 * Panomatic 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 Panomatic; if not, write to the Free Software
00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00021 #ifndef __Tracer_h
00022 #define __Tracer_h
00023 
00024 #include <iostream>
00025 #include "zthread/FastMutex.h"
00026 #include "zthread/Guard.h"
00027 
00028 static ZThread::FastMutex aIOMutex;
00029 
00030 #define TRACE_INFO(x) { ZThread::Guard<ZThread::FastMutex> g(aIOMutex); std::cout << x; }
00031 
00032 #ifdef _DEBUG
00033 #define TRACE_DEBUG(x) { ZThread::Guard<ZThread::FastMutex> g(aIOMutex); std::cout << x; }
00034 #else
00035 #define TRACE_DEBUG(x)
00036 #endif
00037 
00038 #define TRACE_ERROR(x) { ZThread::Guard<ZThread::FastMutex> g(aIOMutex); std::cerr << x; }
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 #endif //  __Tracer_h
00047 

Generated on Sat Aug 30 01:25:39 2014 for Hugintrunk by  doxygen 1.3.9.1