]> git.sesse.net Git - casparcg/blobdiff - common/diagnostics/graph.h
2.0.2: Is now locked, only bug fixes should be added. New features go into 2.1.0.
[casparcg] / common / diagnostics / graph.h
index a00f85526e608be87f24b6132fbc79e92f17d47f..5bdcda25a829d144350320f1a27cbe70c74b92fa 100644 (file)
@@ -1,22 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\r
 *\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
 *\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
 *\r
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
+\r
 #pragma once\r
 \r
 #include "../memory/safe_ptr.h"\r
@@ -51,24 +53,24 @@ struct color
 \r
 class graph\r
 {\r
-       friend safe_ptr<graph> create_graph(const std::string& name);\r
-       friend safe_ptr<graph> create_graph(const printer& parent_printer);\r
-       graph(const std::string& name);\r
-       graph(const printer& parent_printer);\r
+       friend void register_graph(const safe_ptr<graph>& graph);\r
 public:\r
-       void update_value(const std::string& name, float value);\r
-       void set_value(const std::string& name, float value);\r
+       graph();\r
+       void set_text(const std::string& value);\r
+       void set_text(const std::wstring& value);\r
+       void update_value(const std::string& name, double value);\r
+       void set_value(const std::string& name, double value);\r
        void set_color(const std::string& name, color c);\r
        void add_tag(const std::string& name);\r
-       void add_guide(const std::string& name, float value);\r
+       void add_guide(const std::string& name, double value);\r
 private:\r
        struct implementation;\r
        std::shared_ptr<implementation> impl_;\r
 };\r
 \r
-safe_ptr<graph> create_graph(const std::string& name);\r
-safe_ptr<graph> create_graph(const printer& parent_printer);\r
-       \r
+void register_graph(const safe_ptr<graph>& graph);\r
+void show_graphs(bool value);\r
+\r
 //namespace v2\r
 //{\r
 //     \r