glc_tracelog.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser 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  GLC-lib 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 Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021  *****************************************************************************/
00022 
00023 #ifndef GLC_TRACELOG_H_
00024 #define GLC_TRACELOG_H_
00025 
00026 #include "glc_log.h"
00027 #include "glc_config.h"
00028 #include <QStringList>
00029 #include <QMutex>
00030 
00033 
00034 
00035 class GLC_LIB_EXPORT GLC_TraceLog : public GLC_Log
00036 {
00038 
00040 
00041 private:
00043         GLC_TraceLog(const QString& fullLogFileName);
00044 public:
00046         virtual ~GLC_TraceLog();
00048 
00049 
00051 
00052 public:
00054         static GLC_TraceLog* instance(QString baseName= QString());
00055 
00057         static bool isEmpty();
00058 
00060         static bool isEnable();
00061 
00063 
00064 
00066 
00067 public:
00069         static void addTrace(const QStringList& traceDescription);
00070 
00072         static void close();
00073 
00075         static void setEnabled(bool enable);
00076 
00078 
00079 
00081 
00083 
00084 public:
00086         void writeHeader();
00087 
00089 
00091 // Private members
00093 private:
00095         static GLC_TraceLog* m_pTraceLog;
00096 
00098         static QMutex m_Mutex;
00099 
00101         static bool m_IsEnable;
00102 
00103 };
00104 
00105 #endif /* GLC_TRACELOG_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon