From 32902edf1f17bb62144f21ed38ae085bd2755e9f Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 21 Dec 2009 10:46:57 +0100 Subject: change namespace indentation to 0 A silly change, but this works better with other tools, like git diff. I should have started the C++ files this way. --- grapher/GraphData.hxx | 104 +++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'grapher/GraphData.hxx') diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx index fb1ca9f5..863b1d07 100644 --- a/grapher/GraphData.hxx +++ b/grapher/GraphData.hxx @@ -25,63 +25,63 @@ namespace systemtap { - struct GraphDataBase; - typedef std::vector > GraphDataList; - struct GraphDataBase - { - virtual ~GraphDataBase() {} +struct GraphDataBase; +typedef std::vector > GraphDataList; +struct GraphDataBase +{ + virtual ~GraphDataBase() {} - typedef boost::circular_buffer TimeList; - GraphDataBase(TimeList::capacity_type cap = 50000) - : scale(1.0), style(&GraphStyleBar::instance), times(cap) - { - color[0] = 0.0; color[1] = 1.0; color[2] = 0.0; - } - virtual std::string elementAsString(size_t element) = 0; - // size of grid square at "normal" viewing - std::string name; - double scale; - double color[3]; - GraphStyle* style; - std::string title; - 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 graphDataChanged; - }; + typedef boost::circular_buffer TimeList; + GraphDataBase(TimeList::capacity_type cap = 50000) + : scale(1.0), style(&GraphStyleBar::instance), times(cap) + { + color[0] = 0.0; color[1] = 1.0; color[2] = 0.0; + } + virtual std::string elementAsString(size_t element) = 0; + // size of grid square at "normal" viewing + std::string name; + double scale; + double color[3]; + GraphStyle* style; + std::string title; + 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 graphDataChanged; +}; - template - class GraphData : public GraphDataBase +template +class GraphData : public GraphDataBase +{ +public: + typedef T data_type; + typedef boost::circular_buffer DataList; + GraphData(typename DataList::capacity_type cap = 50000) + : GraphDataBase(cap), data(cap) { - public: - typedef T data_type; - typedef boost::circular_buffer DataList; - GraphData(typename DataList::capacity_type cap = 50000) - : GraphDataBase(cap), data(cap) - { - } - std::string elementAsString(size_t element) - { - std::ostringstream stream; - stream << data[element]; - return stream.str(); - } - DataList data; - }; - struct CSVData + } + std::string elementAsString(size_t element) { - typedef std::pair > - Element; - std::vector elements; - }; + std::ostringstream stream; + stream << data[element]; + return stream.str(); + } + DataList data; +}; +struct CSVData +{ + typedef std::pair > + Element; + std::vector elements; +}; - inline GraphDataList& getGraphData() { return GraphDataBase::graphData; } +inline GraphDataList& getGraphData() { return GraphDataBase::graphData; } - inline sigc::signal& graphDataSignal() - { - return GraphDataBase::graphDataChanged; - } +inline sigc::signal& graphDataSignal() +{ + return GraphDataBase::graphDataChanged; +} } #endif -- cgit