From: Joel Holdsworth Date: Mon, 2 Dec 2013 20:08:31 +0000 (+0000) Subject: Added Signal::data accessor function X-Git-Tag: pulseview-0.2.0~202 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9a0cd293620ae082a46ee5f2e53bf700301f9c87;p=pulseview.git Added Signal::data accessor function --- diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index 4304fd1e..bcd0f200 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -55,6 +55,11 @@ AnalogSignal::~AnalogSignal() { } +boost::shared_ptr AnalogSignal::data() const +{ + return _data; +} + void AnalogSignal::set_scale(float scale) { _scale = scale; diff --git a/pv/view/analogsignal.h b/pv/view/analogsignal.h index 64d138d8..279ed108 100644 --- a/pv/view/analogsignal.h +++ b/pv/view/analogsignal.h @@ -47,6 +47,8 @@ public: virtual ~AnalogSignal(); + boost::shared_ptr data() const; + void set_scale(float scale); /** diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index fb84d70a..54faa601 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -76,6 +76,11 @@ LogicSignal::~LogicSignal() { } +boost::shared_ptr LogicSignal::data() const +{ + return _data; +} + boost::shared_ptr LogicSignal::logic_data() const { return _data; diff --git a/pv/view/logicsignal.h b/pv/view/logicsignal.h index 86c411a0..992745eb 100644 --- a/pv/view/logicsignal.h +++ b/pv/view/logicsignal.h @@ -54,6 +54,8 @@ public: virtual ~LogicSignal(); + boost::shared_ptr data() const; + boost::shared_ptr logic_data() const; /** diff --git a/pv/view/signal.h b/pv/view/signal.h index e5e91954..bdbd27a3 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -21,6 +21,8 @@ #ifndef PULSEVIEW_PV_VIEW_SIGNAL_H #define PULSEVIEW_PV_VIEW_SIGNAL_H +#include + #include #include @@ -51,6 +53,8 @@ public: */ void set_name(QString name); + virtual boost::shared_ptr data() const = 0; + /** * Returns true if the trace is visible and enabled. */