QXRD  0.11.16
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QcepDebugDictionary Class Reference

#include <qcepdebug.h>

Inheritance diagram for QcepDebugDictionary:
Inheritance graph
[legend]
Collaboration diagram for QcepDebugDictionary:
Collaboration graph
[legend]

Public Member Functions

 QcepDebugDictionary ()
 
qint64 debugLevel () const
 
void setDebugLevel (qint64 level)
 
QString message (int val) const
 

Static Public Member Functions

static QString hexArg (void *p)
 

Protected Member Functions

void setMessage (int val, QString msg)
 

Private Attributes

qint64 m_DebugLevel
 
QMap< int, QString > m_Messages
 

Detailed Description

Definition at line 27 of file qcepdebug.h.

Constructor & Destructor Documentation

QcepDebugDictionary::QcepDebugDictionary ( )

Definition at line 6 of file qcepdebug.cpp.

References DEBUG_ALLOCATOR, DEBUG_APP, DEBUG_CONSTRUCTORS, DEBUG_DATABROWSER, DEBUG_DISPLAY, DEBUG_DRAGDROP, DEBUG_IMAGE_CONSTRUCTORS, DEBUG_LOCKING, DEBUG_NOMESSAGES, DEBUG_PREFS, DEBUG_PROPERTIES, DEBUG_QUEUES, DEBUG_SERVER, DEBUG_THREADS, DEBUG_WINDOW, and setMessage().

6  :
7  m_DebugLevel(0)
8 {
9  setMessage(DEBUG_NOMESSAGES, "Disable All Debug Messages");
10  setMessage(DEBUG_APP, "Application startup and shutdown");
11  setMessage(DEBUG_PROPERTIES, "Properties");
12  setMessage(DEBUG_WINDOW, "Window Operations");
13  setMessage(DEBUG_PREFS, "Settings/Prefs Operations");
14  setMessage(DEBUG_DISPLAY, "Display Operations");
15  setMessage(DEBUG_CONSTRUCTORS, "Object Constructors/Destructors");
16  setMessage(DEBUG_ALLOCATOR, "Memory Allocation");
17  setMessage(DEBUG_THREADS, "Thread Initialization");
18  setMessage(DEBUG_QUEUES, "Queue Operations");
19  setMessage(DEBUG_IMAGE_CONSTRUCTORS, "Image Object Constructors/Destructors");
20  setMessage(DEBUG_LOCKING, "Debug Mutex Lock Operations");
21  setMessage(DEBUG_SERVER, "Server Commands");
22  setMessage(DEBUG_DATABROWSER, "Data Browser Operations");
23  setMessage(DEBUG_DRAGDROP, "Drag and Drop Operations");
24 }
void setMessage(int val, QString msg)
Definition: qcepdebug.cpp:56

Here is the call graph for this function:

Member Function Documentation

qint64 QcepDebugDictionary::debugLevel ( ) const

Definition at line 41 of file qcepdebug.cpp.

References m_DebugLevel.

42 {
43  return m_DebugLevel;
44 }
QString QcepDebugDictionary::hexArg ( void *  p)
static

Definition at line 66 of file qcepdebug.cpp.

67 {
68 #if (QT_POINTER_SIZE==4)
69  return tr("0x%1").arg((quint32)p, 8, 16, QLatin1Char('0'));
70 #else
71  return tr("0x%1").arg((quint64)p, 16, 16, QLatin1Char('0'));
72 #endif
73 }
QString QcepDebugDictionary::message ( int  val) const

Definition at line 51 of file qcepdebug.cpp.

References m_Messages.

Referenced by setMessage().

52 {
53  return m_Messages.value(val);
54 }
QMap< int, QString > m_Messages
Definition: qcepdebug.h:43

Here is the caller graph for this function:

void QcepDebugDictionary::setDebugLevel ( qint64  level)

Definition at line 46 of file qcepdebug.cpp.

References m_DebugLevel.

47 {
48  m_DebugLevel = level;
49 }
void QcepDebugDictionary::setMessage ( int  val,
QString  msg 
)
protected

Definition at line 56 of file qcepdebug.cpp.

References m_Messages, and message().

Referenced by QcepDebugDictionary(), and QxrdDebugDictionary::QxrdDebugDictionary().

57 {
58  if (m_Messages.contains(val)) {
59  printf("Warning: duplicate messages for value %x\nExisting: %s\nNew:%s\n",
60  val, qPrintable(message(val)), qPrintable(msg));
61  }
62 
63  m_Messages.insert(val, msg);
64 }
QString message(int val) const
Definition: qcepdebug.cpp:51
QMap< int, QString > m_Messages
Definition: qcepdebug.h:43

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

qint64 QcepDebugDictionary::m_DebugLevel
private

Definition at line 42 of file qcepdebug.h.

Referenced by debugLevel(), and setDebugLevel().

QMap<int, QString> QcepDebugDictionary::m_Messages
private

Definition at line 43 of file qcepdebug.h.

Referenced by message(), and setMessage().


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