Tracing outputs starting and finishing messages for some lengthy procedures. Its constructor will output a given string, the destructor will output "finished\\n". That means you have to start a new block and define a local trancing object in there. When entering the block the constructor is called, the start message is printed. When leaving the block the descructor displays the finishing message. For convenience there are some macros defining the local object so you can write:
{
ACG_TRACE("What's the meaning of like?");
for (years=0; years <= ACG::NumLimitsT<int>::max(); ++years)
{
ACG_TRACE_PROGRESS;
}
std::cout << "42";
}
If you want to trace only one command you can also use:
ACG_TRACE_CMD("What's the meaning of like?", calc_meaning_of_life());
- See also
- TimedTracing
Definition at line 119 of file Tracing.hh.