1Debugging macros(3)                QuantLib                Debugging macros(3)
2
3
4

NAME

6       Debugging macros -
7

Detailed Description

9       For debugging purposes, macros can be used to output information about
10       the code being executed.
11
12   Defines
13       #define QL_TRACE_ENABLE
14           enable tracing
15       #define QL_TRACE_DISABLE
16           disable tracing
17       #define QL_TRACE_ON(out)
18           set tracing stream
19       #define QL_TRACE(message)
20           output tracing information
21       #define QL_TRACE_ENTER_FUNCTION
22           output tracing information
23       #define QL_TRACE_EXIT_FUNCTION
24           output tracing information
25       #define QL_TRACE_LOCATION
26           output tracing information
27       #define QL_TRACE_VARIABLE(variable)
28           output tracing information
29

Define Documentation

31   #define QL_TRACE_ENABLE
32       enable tracing
33
34       The statement
35
36           QL_TRACE_ENABLE;
37
38
39        can be used to enable tracing. Such statement might be ignored; refer
40       to QL_TRACE for details.
41
42       Examples:
43           tracing_example.cpp.
44
45   #define QL_TRACE_DISABLE
46       disable tracing
47
48       The statement
49
50           QL_TRACE_DISABLE;
51
52
53        can be used to disable tracing. Such statement might be ignored; refer
54       to QL_TRACE for details.
55
56   #define QL_TRACE_ON(out)
57       set tracing stream
58
59       The statement
60
61           QL_TRACE_ON(stream);
62
63
64        can be used to set the stream where tracing messages are output. Such
65       statement might be ignored; refer to QL_TRACE for details.
66
67   #define QL_TRACE(message)
68       output tracing information
69
70       The statement
71
72           QL_TRACE(message);
73
74
75        can be used to output a trace of the code being executed. If tracing
76       was disabled during configuration, such statements are removed by the
77       preprocessor for maximum performance; if it was enabled, whether and
78       where the message is output depends on the current settings.
79
80       Examples:
81           tracing_example.cpp.
82
83   #define QL_TRACE_ENTER_FUNCTION
84       output tracing information
85
86       The statement
87
88           QL_TRACE_ENTER_FUNCTION;
89
90
91        can be used at the beginning of a function to trace the fact that the
92       program execution is entering such function. It should be paired with a
93       corresponding QL_TRACE_EXIT_FUNCTION macro. Such statement might be
94       ignored; refer to QL_TRACE for details. Also, function information
95       might not be available depending on the compiler.
96
97       Examples:
98           tracing_example.cpp.
99
100   #define QL_TRACE_EXIT_FUNCTION
101       output tracing information
102
103       The statement
104
105           QL_TRACE_EXIT_FUNCTION;
106
107
108        can be used before returning from a function to trace the fact that
109       the program execution is exiting such function. It should be paired
110       with a corresponding QL_TRACE_ENTER_FUNCTION macro. Such statement
111       might be ignored; refer to QL_TRACE for details. Also, function
112       information might not be available depending on the compiler.
113
114       Examples:
115           tracing_example.cpp.
116
117   #define QL_TRACE_LOCATION
118       output tracing information
119
120       The statement
121
122           QL_TRACE_LOCATION;
123
124
125        can be used to trace the current file and line. Such statement might
126       be ignored; refer to QL_TRACE for details.
127
128       Examples:
129           tracing_example.cpp.
130
131   #define QL_TRACE_VARIABLE(variable)
132       output tracing information
133
134       The statement
135
136           QL_TRACE_VARIABLE(variable);
137
138
139        can be used to trace the current value of a variable. Such statement
140       might be ignored; refer to QL_TRACE for details. Also, the variable
141       type must allow sending it to an output stream.
142
143       Examples:
144           tracing_example.cpp.
145
146
147
148Version 0.8.1                     29 Oct 2007              Debugging macros(3)
Impressum