]> sigrok.org Git - pulseview.git/blobdiff - pv/data/signaldata.hpp
DecodeSignal: Allow muxed logic data to be cached
[pulseview.git] / pv / data / signaldata.hpp
index 35b1305fcfcf0a4d90b7890f1d829218d0a8c65f..adede1c211c595eefb9e108d1929cad6d9b5af0b 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_DATA_SIGNALDATA_H
-#define PULSEVIEW_PV_DATA_SIGNALDATA_H
+#ifndef PULSEVIEW_PV_DATA_SIGNALDATA_HPP
+#define PULSEVIEW_PV_DATA_SIGNALDATA_HPP
 
 #include <cstdint>
 #include <memory>
 #include <vector>
 
+#include <QObject>
+
+using std::shared_ptr;
+using std::vector;
+
 namespace pv {
 namespace data {
 
-class Snapshot;
+class Segment;
 
-class SignalData
+class SignalData : public QObject
 {
-public:
-       SignalData();
-       virtual ~SignalData() {}
+       Q_OBJECT
 
 public:
-       double samplerate() const;
-       void set_samplerate(double samplerate);
+       SignalData() = default;
+       virtual ~SignalData() = default;
 
-       double get_start_time() const;
+public:
+       virtual vector< shared_ptr<Segment> > segments() const = 0;
 
-       virtual std::vector< std::shared_ptr<Snapshot> > snapshots() const = 0;
+       virtual int get_segment_count() const = 0;
 
        virtual void clear() = 0;
 
-       virtual uint64_t get_max_sample_count() const = 0;
-
-protected:
-       double start_time_;
-       double samplerate_;
+       virtual uint64_t max_sample_count() const = 0;
 };
 
 } // namespace data
 } // namespace pv
 
-#endif // PULSEVIEW_PV_DATA_SIGNALDATA_H
+#endif // PULSEVIEW_PV_DATA_SIGNALDATA_HPP