tracy/server/TracyUserData.hpp

39 lines
688 B
C++
Raw Normal View History

2019-07-26 21:05:24 +00:00
#ifndef __TRACYUSERDATA_HPP__
#define __TRACYUSERDATA_HPP__
#include <stdint.h>
2019-08-28 17:28:31 +00:00
#include <stdio.h>
2019-07-26 21:05:24 +00:00
#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();
2019-07-26 21:05:24 +00:00
private:
2019-08-28 17:28:31 +00:00
FILE* OpenFile( const char* filename, bool write );
2019-07-26 21:05:24 +00:00
std::string m_program;
uint64_t m_time;
std::string m_description;
bool m_preserveState;
2019-07-26 21:05:24 +00:00
};
}
#endif