qCC_db  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | List of all members
ccLog Class Referenceabstract

Main log interface. More...

#include <ccLog.h>

Public Member Functions

virtual ~ccLog ()
 Destructor.
 

Static Public Member Functions

static ccLogTheInstance ()
 Returns the static and unique instance.
 
static void RegisterInstance (ccLog *logInstance)
 Registers a unique instance.
 
static bool Print (const char *format,...)
 Prints out a formated message in console. More...
 
static bool Print (const QString &message)
 QString version of 'Print'.
 
static bool PrintDebug (const char *format,...)
 Same as Print, but works only in debug mode. More...
 
static bool PrintDebug (const QString &message)
 QString version of 'PrintDebug'.
 
static bool Warning (const char *format,...)
 Prints out a formated warning message in console. More...
 
static bool Warning (const QString &message)
 QString version of 'Warning'.
 
static bool WarningDebug (const char *format,...)
 Same as Warning, but works only in debug mode. More...
 
static bool WarningDebug (const QString &message)
 QString version of 'WarningDebug'.
 
static bool Error (const char *format,...)
 Display an error dialog with formated message. More...
 
static bool Error (const QString &message)
 QString version of 'Error'.
 
static bool ErrorDebug (const char *format,...)
 Same as Error, but works only in debug mode. More...
 
static bool ErrorDebug (const QString &message)
 QString version of 'ErrorDebug'.
 

Protected Types

enum  MessageLevel {
  LOG_STANDARD = 0, LOG_STANDARD_DEBUG = 1, LOG_WARNING = 2, LOG_WARNING_DEBUG = 3,
  LOG_ERROR = 4, LOG_ERROR_DEBUG = 5
}
 Message level. More...
 

Protected Member Functions

virtual void displayMessage (const QString &message, MessageLevel level)=0
 Generic message display method. More...
 

Detailed Description

Main log interface.

This interface is meant to be used as a unique (static) instance. It should be thread safe!

Member Enumeration Documentation

enum ccLog::MessageLevel
protected

Message level.

Enumerator
LOG_STANDARD 

Standard message (Print)

LOG_STANDARD_DEBUG 

Standard message - debug only (PrintDebug)

LOG_WARNING 

Warning message (Warning)

LOG_WARNING_DEBUG 

Warning message - debug only (WarningDebug)

LOG_ERROR 

Error message (Error)

LOG_ERROR_DEBUG 

Error message - debug only (ErrorDebug)

Member Function Documentation

virtual void ccLog::displayMessage ( const QString &  message,
MessageLevel  level 
)
protectedpure virtual

Generic message display method.

To be implemented by child class. WARNING: MUST BE THREAD SAFE!

Parameters
messagemessage
levelmessage severity
bool ccLog::Error ( const char *  format,
  ... 
)
static

Display an error dialog with formated message.

Works just like the 'printf' command.

Returns
always return 'false'
bool ccLog::ErrorDebug ( const char *  format,
  ... 
)
static

Same as Error, but works only in debug mode.

Works just like the 'printf' command.

Returns
always return 'false'
bool ccLog::Print ( const char *  format,
  ... 
)
static

Prints out a formated message in console.

Works just like the 'printf' command.

Returns
always return 'true'
bool ccLog::PrintDebug ( const char *  format,
  ... 
)
static

Same as Print, but works only in debug mode.

Works just like the 'printf' command.

Returns
always return 'true'
bool ccLog::Warning ( const char *  format,
  ... 
)
static

Prints out a formated warning message in console.

Works just like the 'printf' command.

Returns
always return 'false'
bool ccLog::WarningDebug ( const char *  format,
  ... 
)
static

Same as Warning, but works only in debug mode.

Works just like the 'printf' command.

Returns
always return 'false'

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