ThreadWeaver
DebuggingAids.h File Reference
#include <QtCore/QtGlobal>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <QtCore/QMutex>
#include <QtCore/QString>
#include "threadweaver/threadweaver_export.h"
Include dependency graph for DebuggingAids.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
ThreadWeaver | |
Macros | |
#define | DEBUGONLY(x) x |
#define | ENSURE(x) |
#define | INVARIANT Q_ASSERT_X (invariant(), __FILE__, "class invariant failed" ); |
#define | P_ASSERT(x) do { QMutexLocker l(&ThreadWeaver::GlobalMutex); Q_ASSERT(x); } while (0) |
#define | PROTECT(x) do { QMutexLocker l(&ThreadWeaver::GlobalMutex); (x); } while (0) |
#define | REQUIRE(x) |
Functions | |
void | ThreadWeaver::debug (int severity, const char *cformat,...) |
void | ThreadWeaver::debug (bool condition, int severity, const char *cformat,...) |
bool | ThreadWeaver::invariant () |
void | ThreadWeaver::setDebugLevel (bool debug, int level) |
Variables | |
bool | ThreadWeaver::Debug = true |
int | ThreadWeaver::DebugLevel = 01 |
QMutex | ThreadWeaver::GlobalMutex |
Macro Definition Documentation
#define DEBUGONLY | ( | x | ) | x |
Definition at line 158 of file DebuggingAids.h.
#define ENSURE | ( | x | ) |
Value:
INVARIANT \
Q_ASSERT_X (x, Q_FUNC_INFO, "broken guarantee " #x );
Definition at line 150 of file DebuggingAids.h.
#define INVARIANT Q_ASSERT_X (invariant(), __FILE__, "class invariant failed" ); |
Definition at line 144 of file DebuggingAids.h.
#define P_ASSERT | ( | x | ) | do { QMutexLocker l(&ThreadWeaver::GlobalMutex); Q_ASSERT(x); } while (0) |
P_ASSERT ensures that error messages occur in the correct order.
Definition at line 103 of file DebuggingAids.h.
#define PROTECT | ( | x | ) | do { QMutexLocker l(&ThreadWeaver::GlobalMutex); (x); } while (0) |
PROTECT executes x with GlobalMutex locked.
Mostly used for debugging, as in P_ASSERT.
Definition at line 96 of file DebuggingAids.h.
#define REQUIRE | ( | x | ) |
Value:
INVARIANT \
Q_ASSERT_X (x, Q_FUNC_INFO, "unfulfilled requirement " #x );
Definition at line 146 of file DebuggingAids.h.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.