april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
april_debug.h File Reference

Contains definitions for debugging bbb package. More...

#include <april/april_global.h>
#include <april/april_config.h>
#include <QDebug>

Go to the source code of this file.

Macros

#define ENABLE_LOGGING   1
 logging is enabled
#define IS_APRIL_DEBUG_ID_ALLOWED(id)   false
 disable all IDs
#define APRDBG(id, txt)
#define APRDBG2(id, txt1, txt2)
#define APRDBG3(id, txt1, txt2, txt3)
#define APRDBG_FUNC(id)   APRDBG(id, __func__ )
#define APRDBG_CDTOR   APRDBG2(APRDBG_CTORDTOR, __func__, this )

Enumerations

enum  APRDBG_Codes {
  APRDBG_CTORDTOR, APRDBG_V_CTORDTOR, APRDBG_LIBRARY, APRDBG_MW,
  APRDBG_F, APRDBG_A, APRDBG_FA, APRDBG_ACMP,
  APRDBG_AT, APRDBG_FAT, APRDBG_B, APRDBG_FB,
  APRDBG_COMP, APRDBG_DIR, APRDBG_DNA, APRDBG_DNAV,
  APRDBG_ED, APRDBG_EL, APRDBG_ES, APRDBG_FES,
  APRDBG_R, APRDBG_FR, APRDBG_S, APRDBG_FS,
  APRDBG_W, APRDBG_FW, APRDBG_UID, APRDBG_MAX
}
 The APRDBG_Codes enum defines codes that may be used to debug the library. More...

Functions

APRILSHARED_EXPORT const char * april::debugName (int i)
 get the name for a particular debug ID
APRILSHARED_EXPORT bool april::filterDebug (int i)
 may be used by the IS_APRIL_DEBUG_ID_ALLOWED in

Detailed Description

Contains definitions for debugging bbb package.

Date
November 2012
Author
TNick

Macro Definition Documentation

#define APRDBG (   id,
  txt 
)
Value:
qDebug() << april::debugName(id) << ": " << txt

macros that intermediate the logging (enabled)

#define APRDBG2 (   id,
  txt1,
  txt2 
)
Value:
qDebug() << april::debugName(id) << ": " << txt1 << txt2

macros that intermediate the logging (enabled)

#define APRDBG3 (   id,
  txt1,
  txt2,
  txt3 
)
Value:
qDebug() << april::debugName(id) << ": " << txt1 << txt2 << txt3

macros that intermediate the logging (enabled)

#define APRDBG_CDTOR   APRDBG2(APRDBG_CTORDTOR, __func__, this )

macros that intermediate the logging (enabled)

#define APRDBG_FUNC (   id)    APRDBG(id, __func__ )

macros that intermediate the logging (enabled)

Enumeration Type Documentation

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

Each value may be used with the IS_APRIL_DEBUG_ID_ALLOWED in april_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 APRDBG... group of macros).