#include <string>
#include <tuple>
+#include <functional>
#include <boost/noncopyable.hpp>
int color(float r, float g, float b, float a = 1.0f);
std::tuple<float, float, float, float> color(int code);
+enum class tag_severity
+{
+ WARNING,
+ INFO
+};
+
class graph : boost::noncopyable
{
friend void register_graph(const spl::shared_ptr<graph>& graph);
void set_text(const std::wstring& value);
void set_value(const std::string& name, double value);
void set_color(const std::string& name, int color);
- void set_tag(const std::string& name);
+ void set_tag(tag_severity severity, const std::string& name);
void auto_reset();
private:
struct impl;
};
void register_graph(const spl::shared_ptr<graph>& graph);
-void show_graphs(bool value);
-void shutdown();
+
+namespace spi {
+
+class graph_sink : boost::noncopyable
+{
+public:
+ virtual ~graph_sink() { }
+ virtual void activate() = 0;
+ virtual void set_text(const std::wstring& value) = 0;
+ virtual void set_value(const std::string& name, double value) = 0;
+ virtual void set_color(const std::string& name, int color) = 0;
+ virtual void set_tag(tag_severity severity, const std::string& name) = 0;
+ virtual void auto_reset() = 0;
+};
+
+typedef std::function<spl::shared_ptr<graph_sink>()> sink_factory_t;
+void register_sink_factory(sink_factory_t factory);
+
+}
}}
\ No newline at end of file