Hymn to Beauty
C++ 3D Engine
Timeline.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <list>
5#include <json/json.h>
6
7#include "Thread.hpp"
8
9namespace Profiling {
10
12class Timeline {
13 public:
15
20 Thread* AddThread(const std::string& name);
21
23 std::list<Thread> threads;
24
26
29 Json::Value ToJson() const;
30
32
35 void FromJson(const Json::Value& value);
36
37 private:
38 void Clear();
39};
40
41}
A thread containing events.
Definition: Thread.hpp:12
A timeline.
Definition: Timeline.hpp:12
Json::Value ToJson() const
Save timeline to json value.
Definition: Timeline.cpp:10
Thread * AddThread(const std::string &name)
Add a thread to the timeline.
Definition: Timeline.cpp:5
void FromJson(const Json::Value &value)
Load timeline from json value.
Definition: Timeline.cpp:23
std::list< Thread > threads
Threads.
Definition: Timeline.hpp:23
Definition: Event.cpp:3