GLC_TraceLog Class Reference

GLC_TraceLog : handle GLC_lib trace log. More...

#include <glc_tracelog.h>

Inheritance diagram for GLC_TraceLog:
GLC_Log

List of all members.

Public Member Functions

Private services Functions

void writeHeader ()
 Write trace Log header.

Static Public Member Functions

Get Functions

static GLC_TraceLoginstance (QString baseName=QString())
 Return the unique instance of trace log file.
static bool isEmpty ()
 Return true if the log is empty.
static bool isEnable ()
 Return true if the trace log is enable.
Set Functions

static void addTrace (const QStringList &traceDescription)
 Add error into the log.
static void close ()
 Close the log file.
static void setEnabled (bool enable)
 Set enable.

Static Private Attributes

static GLC_TraceLogm_pTraceLog = NULL
 The unique trace log instance.
static QMutex m_Mutex
 The mutex of this unique log.
static bool m_IsEnable = false
 the trace log enable status

Constructor



 GLC_TraceLog (const QString &fullLogFileName)
 Private constructor.
virtual ~GLC_TraceLog ()
 Destructor.

Detailed Description

GLC_TraceLog : handle GLC_lib trace log.

Definition at line 35 of file glc_tracelog.h.


Constructor & Destructor Documentation

GLC_TraceLog::GLC_TraceLog ( const QString &  fullLogFileName  )  [private]

Private constructor.

Definition at line 33 of file glc_tracelog.cpp.

Referenced by instance().

GLC_TraceLog::~GLC_TraceLog (  )  [virtual]

Destructor.

Definition at line 39 of file glc_tracelog.cpp.


Member Function Documentation

void GLC_TraceLog::addTrace ( const QStringList &  traceDescription  )  [static]

Add error into the log.

Definition at line 77 of file glc_tracelog.cpp.

References GLC_Log::add(), GLC_Log::addCurrentTime(), GLC_Log::addSeparator(), instance(), m_IsEnable, and m_Mutex.

Referenced by GLC_BSRep::isUsable(), and GLC_BSRep::open().

void GLC_TraceLog::close (  )  [static]

Close the log file.

Definition at line 91 of file glc_tracelog.cpp.

References m_Mutex, and m_pTraceLog.

GLC_TraceLog * GLC_TraceLog::instance ( QString  baseName = QString()  )  [static]

Return the unique instance of trace log file.

Definition at line 44 of file glc_tracelog.cpp.

References GLC_TraceLog(), m_pTraceLog, and writeHeader().

Referenced by addTrace().

bool GLC_TraceLog::isEmpty ( void   )  [static]

Return true if the log is empty.

Definition at line 67 of file glc_tracelog.cpp.

References m_pTraceLog.

bool GLC_TraceLog::isEnable (  )  [static]

Return true if the trace log is enable.

Definition at line 72 of file glc_tracelog.cpp.

References m_IsEnable.

Referenced by GLC_BSRep::isUsable(), and GLC_BSRep::open().

void GLC_TraceLog::setEnabled ( bool  enable  )  [static]

Set enable.

Definition at line 98 of file glc_tracelog.cpp.

References m_IsEnable.

void GLC_TraceLog::writeHeader (  ) 

Write trace Log header.

Definition at line 103 of file glc_tracelog.cpp.

References GLC_Log::m_TextStream.

Referenced by instance().


Member Data Documentation

bool GLC_TraceLog::m_IsEnable = false [static, private]

the trace log enable status

Definition at line 101 of file glc_tracelog.h.

Referenced by addTrace(), isEnable(), and setEnabled().

QMutex GLC_TraceLog::m_Mutex [static, private]

The mutex of this unique log.

Definition at line 98 of file glc_tracelog.h.

Referenced by addTrace(), and close().

GLC_TraceLog * GLC_TraceLog::m_pTraceLog = NULL [static, private]

The unique trace log instance.

Definition at line 95 of file glc_tracelog.h.

Referenced by close(), instance(), and isEmpty().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005-2011 Laurent Ribon