Files
fs2open.github.com/code/tracing/TraceEventWriter.h
T
asarium d64196eff0 Refactor tracing subsystem
The new design is centered around the Event Trace JSON format but it
should still be possible to adapt it for other profiling tools. The old
profiling system has been removed.
2016-11-24 10:26:21 +01:00

34 lines
569 B
C++

#ifndef _TRACEEVENTWRITER_H
#define _TRACEEVENTWRITER_H
#pragma once
#include "globalincs/pstypes.h"
#include "tracing/tracing.h"
#include "tracing/ThreadedEventProcessor.h"
#include <fstream>
/** @file
* @ingroup tracing
*/
namespace tracing
{
class TraceEventWriter
{
std::ofstream _out;
bool _first_line = true;
public:
TraceEventWriter();
~TraceEventWriter();
void processEvent(const trace_event* event);
};
typedef ThreadedEventProcessor<TraceEventWriter> ThreadedTraceEventWriter;
}
#endif // _TRACEEVENTWRITER_H