libbbb  1.2.1
Groups common code used in some applications and libraries.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
libbbb_debug.h File Reference

Contains definitions for debugging bbb package. More...

#include <libbbb/libbbb_global.h>
#include <libbbb/libbbb_config.h>
#include <QDebug>

Go to the source code of this file.

Macros

#define BBB_ENABLE_LOGGING   1
 
#define IS_BBB_DEBUG_ID_ALLOWED(id)   false
 
#define BBBDBG(id, txt)
 
#define BBBDBG2(id, txt1, txt2)
 
#define BBBDBG3(id, txt1, txt2, txt3)
 
#define BBBDBG_FUNC(id)   BBBDBG(id, __func__ )
 
#define BBBDBG_CDTOR   BBBDBG2(BBBDBG_CTORDTOR, __func__, this )
 

Enumerations

enum  BBBDBG_Codes {
  BBBDBG_CTORDTOR, BBBDBG_V_CTORDTOR, BBBDBG_LIBRARY, BBBDBG_REX,
  BBBDBG_MAX
}
 The BBBDBG_Codes enum defines codes that may be used to debug the library. More...
 

Functions

BBBSHARED_EXPORT const char * bbb::debugName (int i)
 

Detailed Description

Contains definitions for debugging bbb package.

Date
June 2013
Author
TNick

Macro Definition Documentation

#define BBBDBG (   id,
  txt 
)
Value:
if ( IS_BBB_DEBUG_ID_ALLOWED( id ) ) \
qDebug() << bbb::debugName(id) << ": " << txt
#define BBBDBG2 (   id,
  txt1,
  txt2 
)
Value:
if ( IS_BBB_DEBUG_ID_ALLOWED( id ) ) \
qDebug() << bbb::debugName(id) << ": " << txt1 << txt2
#define BBBDBG3 (   id,
  txt1,
  txt2,
  txt3 
)
Value:
if ( IS_BBB_DEBUG_ID_ALLOWED( id ) ) \
qDebug() << bbb::debugName(id) << ": " << txt1 << txt2 << txt3

Enumeration Type Documentation

The BBBDBG_Codes enum defines codes that may be used to debug the library.

Each value may be used with the IS_BBB_DEBUG_ID_ALLOWED in LIBBBB_config.h to enable or disable presenting messages tagged with that code.

At run time (when QT_NO_DEBUG is defined) these messages are removed entierly from the output (notice the BBBDBG... group of macros).

Enumerator
BBBDBG_CTORDTOR 

all constructors and destructors

BBBDBG_V_CTORDTOR 

constructors and destructors called a lot

BBBDBG_LIBRARY 

library in general

BBBDBG_REX 

rexscript part