COXTrace Description
Copyright © Dundas Software Ltd. 1997-1999, All Rights Reserved 

COXTrace class gives you additional power that can simplify the process of testing and debugging your applications. 
This class provides all the functionality of TRACE macro but also it allows you to forward trace output into file. The following additional features implemented in the COXTrace class: 

•	Built-in word wrapping 
•	Automatic marking of the start and end of a block of code 
•	Automatic indenting of the messages to provide a way to track nesting of COXTrace blocks. 

All these features simplify the process of reading of output file. E.g. is length of trace message is more than given value (this value can be updated through use of macro) it will be automatically wrapped. Then whenever new COXTrace object is created class we associate new block of trace messages with it. Class traces when object is being destroyed and mark the end of the corresponding block and automatically add trace message that specifies that the end of the block has been reached. This way you can organize your trace messages in logical groups and analyze them independently (like blocks of  commands in a programming language). 

Moreover COXTrace automatically indents trace messages. Whenever start of block is marked the indention is increased and whenever end of block is marked the indention is decreased. It simplifies the process of reading of trace messages greatly.

COXTrace class has extremely simple interface. First of all you should setup the environment (the name of output file using SetDumpFile() function plus other COXTrace properties that define the appearance of trace messages). In order to post trace messages you have to instantiate COXTrace object (the start of new block of trace messages will be marked automatically). Then you can call any of Write() or WriteFormatted() functions in order to add new trace messages. When COXTrace object is being destroyed the end of corresponding block of trace messages will be marked and message that notifies about that event will be posted automatically (like end bracket in C++). 

Refer to the AdvancedTrace sample found in .\Samples\Utility\AdvancedTrace subdirectory of your Ultimate Toolbox directory for example of different ways you can use COXTrace class.
 
Dependencies
#include "OXTrace.h"