summaryrefslogtreecommitdiffstats
path: root/grapher/GraphData.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/GraphData.hxx')
-rw-r--r--grapher/GraphData.hxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx
index 04f415f3..fb1ca9f5 100644
--- a/grapher/GraphData.hxx
+++ b/grapher/GraphData.hxx
@@ -1,3 +1,11 @@
+// systemtap grapher
+// Copyright (C) 2009 Red Hat Inc.
+//
+// This file is part of systemtap, and is free software. You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
#ifndef SYSTEMTAP_GRAPHDATA_HXX
#define SYSTEMTAP_GRAPHDATA_HXX 1
@@ -11,10 +19,14 @@
#include <boost/circular_buffer.hpp>
+#include <gtkmm.h>
+
#include "GraphStyle.hxx"
namespace systemtap
{
+ struct GraphDataBase;
+ typedef std::vector<std::tr1::shared_ptr<GraphDataBase> > GraphDataList;
struct GraphDataBase
{
virtual ~GraphDataBase() {}
@@ -35,6 +47,9 @@ namespace systemtap
std::string xAxisText;
std::string yAxisText;
TimeList times;
+ static GraphDataList graphData;
+ // signal stuff for telling everyone about changes to the data set list
+ static sigc::signal<void> graphDataChanged;
};
template<typename T>
@@ -61,5 +76,12 @@ namespace systemtap
Element;
std::vector<Element> elements;
};
+
+ inline GraphDataList& getGraphData() { return GraphDataBase::graphData; }
+
+ inline sigc::signal<void>& graphDataSignal()
+ {
+ return GraphDataBase::graphDataChanged;
+ }
}
#endif