2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG.
\r
6 * CasparCG is free software: you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation, either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * CasparCG is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
\r
22 #include "../memory/safe_ptr.h"
\r
24 #include <functional>
\r
29 #include <boost/range/iterator_range.hpp>
\r
30 #include <boost/circular_buffer.hpp>
\r
34 typedef std::function<std::wstring()> printer;
\r
36 namespace diagnostics {
\r
45 color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f)
\r
54 friend safe_ptr<graph> create_graph(const std::string& name);
\r
55 friend safe_ptr<graph> create_graph(const printer& parent_printer);
\r
56 graph(const std::string& name);
\r
57 graph(const printer& parent_printer);
\r
59 void update_value(const std::string& name, float value);
\r
60 void set_value(const std::string& name, float value);
\r
61 void set_color(const std::string& name, color c);
\r
62 void add_tag(const std::string& name);
\r
63 void add_guide(const std::string& name, float value);
\r
65 struct implementation;
\r
66 std::shared_ptr<implementation> impl_;
\r
69 safe_ptr<graph> create_graph(const std::string& name);
\r
70 safe_ptr<graph> create_graph(const printer& parent_printer);
\r
84 // line(const std::wstring& name);
\r
85 // std::wstring print() const;
\r
86 // void update_value(float value);
\r
87 // void set_value(float value);
\r
88 // void set_tag(const std::wstring& tag);
\r
90 // boost::circular_buffer<data>& ticks();
\r
92 // struct implementation;
\r
93 // std::shared_ptr<implementation> impl_;
\r
102 // graph(const std::wstring& name);
\r
103 // graph(const printer& parent_printer);
\r
105 // void update_value(const std::wstring& name, float value);
\r
106 // void set_value(const std::wstring& name, float value);
\r
108 // void set_guide(const std::wstring& name, float value);
\r
109 // void set_color(const std::wstring& name, color c);
\r
111 // color get_color() const;
\r
112 // std::map<std::wstring, line>& get_lines();
\r
114 // std::wstring print() const;
\r
116 // safe_ptr<graph> clone() const;
\r
118 // struct implementation;
\r
119 // std::shared_ptr<implementation> impl_;
\r
122 // static safe_ptr<graph> create_graph(const std::wstring& name);
\r
123 // static safe_ptr<graph> create_graph(const printer& parent_printer);
\r
124 // static std::vector<safe_ptr<graph>> get_all_graphs();
\r