IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXDebug, DXEnableDebug, DXQueryDebug

Function

Perform operations on global debug keys.

Syntax

#include <dx/dx.h>

void DXDebug(char *classes, char *message, ...)
void DXEnableDebug(char *classes, int enable)
int DXQueryDebug(char *classes)

Functional Details

DXDebug compares the array of 1-character keys in classes to the set of keys that have been enabled with DXEnableDebug. If it finds a match, DXDebug calls DXMessage with message and any parameters that follow message.

DXEnableDebug enables or disables (enable = 1 or 0, respectively) the global key corresponding to each key in the array of 1-character keys. Usually, this routine is not called directly but is accessed at run time by calling the Trace module (see IBM Visualization Data Explorer User's Reference).

DXQueryDebug compares the array of 1-character keys to the set of keys that have been enabled with DXEnableDebug. It returns 1 if any key matches; otherwise, it returns 0.
Note:The upper-case letters A-Z and the numbers 0-9 are reserved for system use. Module writers may use the lowercase letters a-z.

Example: If the module code for MyModule() contained the following lines:

  DXDebug("aqr", "the value of the index is %d",i);
  DXDebug("ar", "the last value was %d", last);
  DXDebug("asq", "entering for loop");
  DXDebug("a", "function foo() returned an error ");

Then after executing the following modules:

Trace("q",1);
MyModule();

Messages 1 and 3 would be printed.

If the following modules are then executed:

Trace("r",1);
MyModule();

Messages 1, 2, and 3 would be printed, since both "q" and "r" are now enabled.

If the following modules were then executed:

Trace("qr",0);
MyModule();

None of the messages would be printed, as "a," "q," "s," and "r" are now all disabled.

Messages are printed using the DXMessage function (see DXMessage).

Return Value

DXDebug and DXEnableDebug have no return value. DXQueryDebug returns 0 or 1.

See Also

DXMessage

13.1 , "Error Handling and Messages".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]


[IBM Home Page | Order | Search | Contact IBM | Legal ]