1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-01 05:03:53 +00:00
tracy/server/TracyUserData.hpp
Bartosz Taudul dc5444ff0f Notify UserData that view state should be preserved.
This is only active when a trace is loaded from a file (and state should
be persistent for future sessions using this trace), or when state is
saved to a file (so that future sessions will use current state).

No state is preserved by default, i.e. when the trace was not saved to a
file.
2019-08-28 19:37:01 +02:00

39 lines
688 B
C++

#ifndef __TRACYUSERDATA_HPP__
#define __TRACYUSERDATA_HPP__
#include <stdint.h>
#include <stdio.h>
#include <string>
namespace tracy
{
class UserData
{
public:
UserData();
UserData( const char* program, uint64_t time );
bool Valid() const { return !m_program.empty(); }
void Init( const char* program, uint64_t time );
const std::string& GetDescription() const { return m_description; }
bool SetDescription( const char* description );
void StateShouldBePreserved();
private:
FILE* OpenFile( const char* filename, bool write );
std::string m_program;
uint64_t m_time;
std::string m_description;
bool m_preserveState;
};
}
#endif