1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#ifndef SYNCTRACER_H
#define SYNCTRACER_H
// SyncTracer.h: interface for the CSyncTracer class.
//
//////////////////////////////////////////////////////////////////////
//#define TRACE_SYNC
#include <fstream>
#include <deque>
class CSyncTracer
{
bool init();
public:
void DeleteInterval();
void NewInterval();
void Commit();
CSyncTracer();
virtual ~CSyncTracer();
CSyncTracer& operator<<(const char* c);
CSyncTracer& operator<<(const int i);
CSyncTracer& operator<<(const unsigned i);
CSyncTracer& operator<<(const float f);
std::ofstream* file;
std::ofstream* logfile;
std::string traces[10];
int firstActive;
int nowActive;
};
#ifdef TRACE_SYNC
extern CSyncTracer tracefile;
#endif
#endif /* SYNCTRACER_H */
|