MGC Utilities

There are several base functions that allow us to do logging, visualization, and error detection at run-time. These functions are all centralized into a single source file "Utilities.h"

Assertion
We provide a special assertion system that saves all assertions made, as well as dumps data when an assertion fails. Assertions should be done on all points of critical failure (unable to load a file, unable to allocate memory, etc). The syntax is simply:

Logging
A special logging function (based on "LogData" is provided such that it prints per-process log information, as well as posts the data to the MGC Observer Client. This is used for reviews of performance and visualization of data. This function is:


 * LogData(const char* ComponentName, const char* DataType, const char* Data);
 * ComponentName is the current component name
 * DataType is a string that represents the data type (such as "Position", or "LaserArray")
 * Data is the string of actual data

High-Resolution Timers
A multi-platform high-resolution timer is provided, measuring in fractions of a second. This is used as a measuring device of performance. The overhead is very light, so it can be commonly used.