summaryrefslogtreecommitdiffstats
path: root/grapher/Graph.hxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-01 12:02:24 +0100
committerTim Moore <timoore@redhat.com>2009-12-01 12:30:42 +0100
commit572a176d481c329b370ce52e7bec1a49ed76c225 (patch)
treec4979af7c8089124ee0dd30d63ec14864ea0e9f9 /grapher/Graph.hxx
parent211c338e54b096a41170c5bac99eaf33959076f2 (diff)
downloadsystemtap-steved-572a176d481c329b370ce52e7bec1a49ed76c225.tar.gz
systemtap-steved-572a176d481c329b370ce52e7bec1a49ed76c225.tar.xz
systemtap-steved-572a176d481c329b370ce52e7bec1a49ed76c225.zip
change time type from double to int64_t
* grapher/Graph.hxx (Graph): Change variables holding the time limits of the displayed graph from double to int64_t. * grapher/Graph.cxx (Graph::draw): Do calculations of time differences using int64_t. (Graph::getExtents, Graph::setExtents): Change left and right arguments to int64_t. * grapher/GraphData.hxx (GraphDataBase): Change time type to int64_t. (GraphDataBase::elementAsString): New function. (GraphData::elementAsString): Implementation of that function. * grapher/StapParser.cxx (parseData): Parse time values from the stap script as 64 bit values.
Diffstat (limited to 'grapher/Graph.hxx')
-rw-r--r--grapher/Graph.hxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx
index aad63767..e0e864d6 100644
--- a/grapher/Graph.hxx
+++ b/grapher/Graph.hxx
@@ -11,6 +11,7 @@ namespace systemtap
class Graph : public CairoWidget
{
public:
+ typedef std::vector<std::tr1::shared_ptr<GraphDataBase> > DatasetList;
friend class GraphWidget;
Graph(double x = 0.0, double y = 0.0);
virtual void draw(Cairo::RefPtr<Cairo::Context> cr);
@@ -20,9 +21,9 @@ namespace systemtap
bool getAutoScaling() const { return _autoScaling; }
void setAutoScaling(bool val) { _autoScaling = val; }
void addGraphData(std::tr1::shared_ptr<GraphDataBase> data);
- void getExtents(double& left, double& right, double& top, double& bottom)
+ void getExtents(int64_t& left, int64_t& right, double& top, double& bottom)
const;
- void setExtents(double left, double right, double top, double bottom);
+ void setExtents(int64_t left, int64_t right, double top, double bottom);
// extents of the whole graph area
double _width;
double _height;
@@ -36,11 +37,12 @@ namespace systemtap
bool _autoScrolling;
double _zoomFactor;
std::tr1::shared_ptr<CairoPlayButton> _playButton;
+ DatasetList& getDatasets() { return _datasets; }
+ int64_t getTimeAtPoint(double x);
protected:
- typedef std::vector<std::tr1::shared_ptr<GraphDataBase> > DatasetList;
DatasetList _datasets;
- double _left;
- double _right;
+ int64_t _left;
+ int64_t _right;
double _top;
double _bottom;
};