X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..d2b23b67301bd2d286366d4326a21da3132558fa:/docs/latex/wx/debugcxt.tex?ds=sidebyside diff --git a/docs/latex/wx/debugcxt.tex b/docs/latex/wx/debugcxt.tex index 841b177e3b..8093314875 100644 --- a/docs/latex/wx/debugcxt.tex +++ b/docs/latex/wx/debugcxt.tex @@ -2,15 +2,19 @@ A class for performing various debugging and memory tracing operations. Full functionality (such as printing out objects -currently allocated) is only present in a debugging build of wxWindows, -i.e. if the DEBUG symbol is defined and non-zero. wxDebugContext +currently allocated) is only present in a debugging build of wxWidgets, +i.e. if the \_\_WXDEBUG\_\_ symbol is defined. wxDebugContext and related functions and macros can be compiled out by setting -USE\_DEBUG\_CONTEXT to 0 is wx\_setup.h +wxUSE\_DEBUG\_CONTEXT to 0 is setup.h \wxheading{Derived from} No parent class. +\wxheading{Include files} + + + \wxheading{See also} \overview{Overview}{wxdebugcontextoverview} @@ -40,14 +44,14 @@ derived instance. \wxheading{Return value} -TRUE if the function succeeded, FALSE otherwise. +true if the function succeeded, false otherwise. \membersection{wxDebugContext::GetCheckPrevious}\label{wxdebugcontextgetcheckprevious} \func{bool}{GetCheckPrevious}{\void} -Returns TRUE if the memory allocator checks all previous memory blocks for errors. -By default, this is FALSE since it slows down execution considerably. +Returns true if the memory allocator checks all previous memory blocks for errors. +By default, this is false since it slows down execution considerably. \wxheading{See also} @@ -57,7 +61,7 @@ By default, this is FALSE since it slows down execution considerably. \func{bool}{GetDebugMode}{\void} -Returns TRUE if debug mode is on. If debug mode is on, the wxObject new and delete +Returns true if debug mode is on. If debug mode is on, the wxObject new and delete operators store or use information about memory allocation. Otherwise, a straight malloc and free will be performed by these operators. @@ -74,6 +78,8 @@ the WXTRACELEVEL macro to specify how detailed the trace information is; setting a different level will only have an effect if trace statements in the application specify a value other than one. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{See also} \helpref{wxDebugContext::SetLevel}{wxdebugcontextsetlevel} @@ -84,6 +90,8 @@ specify a value other than one. Returns the output stream associated with the debug context. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{See also} \helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream} @@ -96,13 +104,17 @@ Returns a pointer to the output stream buffer associated with the debug context. There may not necessarily be a stream buffer if the stream has been set by the user. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \membersection{wxDebugContext::HasStream}\label{wxdebugcontexthasstream} \func{bool}{HasStream}{\void} -Returns TRUE if there is a stream currently associated +Returns true if there is a stream currently associated with the debug context. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{See also} \helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}, \helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream} @@ -120,7 +132,7 @@ and whether instances of this class can be dynamically created. \membersection{wxDebugContext::PrintStatistics}\label{wxdebugcontextprintstatistics} -\func{bool}{PrintStatistics}{\param{bool}{ detailed = TRUE}} +\func{bool}{PrintStatistics}{\param{bool}{ detailed = true}} Performs a statistics analysis from the currently set checkpoint, writing to the current debug stream. The number of object and non-object @@ -128,7 +140,7 @@ allocations is printed, together with the total size. \wxheading{Parameters} -\docparam{detailed}{If TRUE, the function will also print how many +\docparam{detailed}{If true, the function will also print how many objects of each class have been allocated, and the space taken by these class instances.} @@ -138,7 +150,7 @@ these class instances.} \membersection{wxDebugContext::SetCheckpoint}\label{wxdebugcontextsetcheckpoint} -\func{void}{SetCheckpoint}{\param{bool}{ all = FALSE}} +\func{void}{SetCheckpoint}{\param{bool}{ all = false}} Sets the current checkpoint: Dump and PrintStatistics operations will be performed from this point on. This allows you to ignore allocations @@ -146,7 +158,7 @@ that have been performed up to this point. \wxheading{Parameters} -\docparam{all}{If TRUE, the checkpoint is reset to include all +\docparam{all}{If true, the checkpoint is reset to include all memory allocations since the program started.} \membersection{wxDebugContext::SetCheckPrevious}\label{wxdebugcontextsetcheckprevious} @@ -154,7 +166,7 @@ memory allocations since the program started.} \func{void}{SetCheckPrevious}{\param{bool}{ check}} Tells the memory allocator to check all previous memory blocks for errors. -By default, this is FALSE since it slows down execution considerably. +By default, this is false since it slows down execution considerably. \wxheading{See also} @@ -168,7 +180,7 @@ Sets the debug mode on or off. If debug mode is on, the wxObject new and delete operators store or use information about memory allocation. Otherwise, a straight malloc and free will be performed by these operators. -By default, debug mode is on if DEBUG is non-zero. If the application +By default, debug mode is on if \_\_WXDEBUG\_\_ is defined. If the application uses this function, it should make sure that all object memory allocated is deallocated with the same value of debug mode. Otherwise, the delete operator might try to look for memory information that does not @@ -195,6 +207,8 @@ the WXTRACELEVEL macro to specify how detailed the trace information is; setting a different level will only have an effect if trace statements in the application specify a value other than one. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{See also} \helpref{wxDebugContext::GetLevel}{wxdebugcontextgetlevel} @@ -206,6 +220,8 @@ specify a value other than one. Sets the debugging stream to be the debugger (Windows) or standard error (other platforms). This is the default setting. The existing stream will be flushed and deleted. +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \membersection{wxDebugContext::SetStream}\label{wxdebugcontextsetstream} \func{void}{SetStream}{\param{ostream* }{stream}, \param{streambuf* }{streamBuf = NULL}} @@ -213,6 +229,8 @@ This is the default setting. The existing stream will be flushed and deleted. Sets the stream and optionally, stream buffer associated with the debug context. This operation flushes and deletes the existing stream (and stream buffer if any). +This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{Parameters} \docparam{stream}{Stream to associate with the debug context. Do not set this to NULL.} @@ -231,10 +249,16 @@ Windows, an ostream constructed with this buffer outputs to the debugger, or other program that intercepts debugging output. On other platforms, the output goes to standard error (cerr). +This is soon to be obsolete, replaced by \helpref{wxLog}{wxlog} functionality. + \wxheading{Derived from} streambuf +\wxheading{Include files} + + + \wxheading{Example} \begin{verbatim}