GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Private Attributes | List of all members
GLC_ErrorLog Class Reference

GLC_ErrorLog : handl GLC_lib error log. More...

#include <glc_errorlog.h>

+ Inheritance diagram for GLC_ErrorLog:

Public Member Functions

Private services Functions
void writeHeader ()
 Write error Log header.
 
- Public Member Functions inherited from GLC_Log
QString fullFileName () const
 Return this log full file name.
 
virtual ~GLC_Log ()
 Destructor.
 

Static Public Member Functions

Get Functions
static GLC_ErrorLoginstance ()
 Return the unique instance of error log file.
 
static bool isEmpty ()
 Return true if the log is empty.
 
Set Functions
static void addError (const QStringList &errorDescription)
 Add error into the log.
 
static void addError (const QString &errorDescription)
 Add error into the log.
 
static void close ()
 Close the log file.
 

Static Private Attributes

static GLC_ErrorLogm_pErrorLog = NULL
 The unique error log instance.
 
static QMutex m_Mutex
 The mutex of this unique log.
 

Constructor

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

Additional Inherited Members

- Protected Member Functions inherited from GLC_Log
void add (const QString &line)
 Add the given string to this log.
 
void addBlankLine ()
 Add blank line to this log.
 
void addSeparator ()
 Add a separator in the log.
 
void addCurrentTime ()
 Add current time in log.
 
 GLC_Log (const QString &baseLogFileName)
 Construct a log of the given base fileName.
 
- Protected Attributes inherited from GLC_Log
QTemporaryFile * m_pFile
 This log file.
 
QTextStream m_TextStream
 This log textStream.
 

Detailed Description

GLC_ErrorLog : handl GLC_lib error log.

Definition at line 36 of file glc_errorlog.h.

Constructor & Destructor Documentation

GLC_ErrorLog::GLC_ErrorLog ( const QString &  fullLogFileName)
private

Private constructor.

Definition at line 33 of file glc_errorlog.cpp.

Referenced by instance().

GLC_ErrorLog::~GLC_ErrorLog ( )
virtual

Destructor.

Definition at line 39 of file glc_errorlog.cpp.

Member Function Documentation

void GLC_ErrorLog::addError ( const QStringList &  errorDescription)
static
void GLC_ErrorLog::addError ( const QString &  errorDescription)
static

Add error into the log.

Definition at line 81 of file glc_errorlog.cpp.

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

void GLC_ErrorLog::close ( )
static

Close the log file.

Definition at line 90 of file glc_errorlog.cpp.

References m_Mutex, and m_pErrorLog.

GLC_ErrorLog * GLC_ErrorLog::instance ( )
static

Return the unique instance of error log file.

Definition at line 44 of file glc_errorlog.cpp.

References GLC_ErrorLog(), m_pErrorLog, and writeHeader().

Referenced by addError().

bool GLC_ErrorLog::isEmpty ( void  )
static

Return true if the log is empty.

Definition at line 64 of file glc_errorlog.cpp.

References m_pErrorLog.

void GLC_ErrorLog::writeHeader ( )

Write error Log header.

Definition at line 97 of file glc_errorlog.cpp.

References GLC_Log::m_TextStream.

Referenced by instance().

Member Data Documentation

QMutex GLC_ErrorLog::m_Mutex
staticprivate

The mutex of this unique log.

Definition at line 96 of file glc_errorlog.h.

Referenced by addError(), and close().

GLC_ErrorLog * GLC_ErrorLog::m_pErrorLog = NULL
staticprivate

The unique error log instance.

Definition at line 93 of file glc_errorlog.h.

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


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

©2005-2013 Laurent Ribon