]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/row.hpp
Rework decoder infrastructure
[pulseview.git] / pv / data / decode / row.hpp
index 9d7992e8ceb0f71b2dd6c80c99a63149079007cd..21f46d22057fccaf71f32f4b419acc24980fb20f 100644 (file)
@@ -22,7 +22,8 @@
 
 #include <vector>
 
-#include "annotation.hpp"
+#include <pv/data/decode/annotation.hpp>
+#include <pv/data/decode/decoder.hpp>
 
 struct srd_decoder;
 struct srd_decoder_annotation_row;
@@ -31,6 +32,7 @@ namespace pv {
 namespace data {
 namespace decode {
 
+struct AnnotationClass;
 class Decoder;
 
 class Row
@@ -38,15 +40,16 @@ class Row
 public:
        Row();
 
-       Row(int index, const Decoder* decoder,
-               const srd_decoder_annotation_row* row = nullptr);
+       Row(uint32_t index, Decoder* decoder,
+               const srd_decoder_annotation_row* srd_row = nullptr);
 
        const Decoder* decoder() const;
-       const srd_decoder_annotation_row* srd_row() const;
+       const srd_decoder_annotation_row* get_srd_row() const;
 
        const QString title() const;
-       const QString class_name() const;
-       int index() const;
+       const QString description() const;
+       vector<AnnotationClass*> ann_classes() const;
+       uint32_t index() const;
 
        bool visible() const;
        void set_visible(bool visible);
@@ -55,9 +58,9 @@ public:
        bool operator==(const Row& other) const;
 
 private:
-       int index_;
-       const Decoder* decoder_;
-       const srd_decoder_annotation_row* row_;
+       uint32_t index_;
+       Decoder* decoder_;
+       const srd_decoder_annotation_row* srd_row_;
        bool visible_;
 };