GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_tracelog.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  *****************************************************************************/
22 
23 #ifndef GLC_TRACELOG_H_
24 #define GLC_TRACELOG_H_
25 
26 #include "glc_log.h"
27 #include "glc_config.h"
28 #include <QStringList>
29 #include <QMutex>
30 
33 
34 
36 {
38 
40 
41 private:
43  GLC_TraceLog(const QString& fullLogFileName);
44 public:
46  virtual ~GLC_TraceLog();
48 
49 
51 
52 public:
54  static GLC_TraceLog* instance(QString baseName= QString());
55 
57  static bool isEmpty();
58 
60  static bool isEnable();
61 
63 
64 
66 
67 public:
69  static void addTrace(const QStringList& traceDescription);
70 
72  static void close();
73 
75  static void setEnabled(bool enable);
76 
78 
79 
81 
83 
84 public:
86  void writeHeader();
87 
89 
91 // Private members
93 private:
96 
98  static QMutex m_Mutex;
99 
101  static bool m_IsEnable;
102 
103 };
104 
105 #endif /* GLC_TRACELOG_H_ */

©2005-2013 Laurent Ribon