39#include "DGtal/base/Config.h"
40#include "DGtal/base/Common.h"
49 trace.
info()<<
"This is an Info trace"<<endl;
51 trace.
error()<<
"This is an Error trace"<<endl;
60 trace.
info()<<
"This is an Info trace, level 0"<<endl;
62 trace.
info()<<
"This is an Info trace, level 1"<<endl;
63 trace.
info()<<
"This is an Info trace, level 1"<<endl;
65 trace.
warning()<<
"This is an Warning trace, level 2"<<endl;
66 trace.
warning()<<
"This is an Warning trace, level 2"<<endl;
67 trace.
info()<<
"This is an Info trace, level 2"<<endl;
68 trace.
error()<<
"This is an Error trace, level 2 (followed by a loop)"<<endl;
70 for (
unsigned int i=0 ; i< 450; i++)
71 tmp = (
long)cos((
double)tmp+i);
74 trace.
info()<<
"This is an Info trace, level 1 (followed by another loop)"<<endl;
76 for (
unsigned int i=0 ; i< 430; i++)
77 tmp = (
long)cos((
double)tmp+i);
80 trace.
info()<<
"This is an Info trace, level 0"<<endl<<endl;
91 trace.
info() <<
"Checking the filestream output.. Please check the 'example.txt' file"<<endl;
94 myfile.open (
"example.txt");
97 Trace t2(traceWriterFile);
99 t2.
info()<<
"This is an Info trace"<<endl;
100 t2.
warning()<<
"This is an warning trace"<<endl;
102 t2.
error()<<
"This is an Error trace"<<endl;
103 t2.
emphase()<<
"This is an Emphased trace"<<endl;
106 t2.
info()<<
"This is an Info trace, level 1"<<endl;
107 t2.
info()<<
"This is an Info trace, level 1"<<endl;
124 for (
unsigned int i=0 ; i< 4350; i++)
125 tmp = (
long)cos((
double)tmp+i);
130 for (
unsigned int i=0 ; i< 4350; i++)
131 tmp = (
long)cos((
double)tmp+i);
135 for (
unsigned int i=0 ; i< 4350; i++)
136 tmp = (
long)cos((
double)tmp+i);
141 for (
unsigned int i=0 ; i< 4350; i++)
142 tmp = (
long)cos((
double)tmp+i);
147 for (
unsigned int i=0 ; i< 4450; i++)
148 tmp = (
long)cos((
double)tmp+i);
155 for (
unsigned int i=0 ; i< 430; i++)
156 tmp = (
long)cos((
double)tmp+i);
160 trace.
info()<<
"Duration="<<duration<<std::endl;
implementation of basic methods to trace out messages with indentation levels.
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.