]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/annotation.hpp
Annotation: Use special type for the class, not plain int
[pulseview.git] / pv / data / decode / annotation.hpp
index 7e62cea1f6d07cf6c78d9b26ee961599ed15fc19..a107e0efeed7426584cbded2169ca639ffc47288 100644 (file)
 #ifndef PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
 #define PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
 
 #ifndef PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
 #define PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
 
-#include <stdint.h>
+#include <cstdint>
+#include <vector>
 
 #include <QString>
 
 
 #include <QString>
 
+using std::vector;
+
 struct srd_proto_data;
 
 namespace pv {
 struct srd_proto_data;
 
 namespace pv {
@@ -32,19 +35,22 @@ namespace decode {
 
 class Annotation
 {
 
 class Annotation
 {
+public:
+       typedef uint32_t Class;
+
 public:
        Annotation(const srd_proto_data *const pdata);
 
        uint64_t start_sample() const;
        uint64_t end_sample() const;
 public:
        Annotation(const srd_proto_data *const pdata);
 
        uint64_t start_sample() const;
        uint64_t end_sample() const;
-       int format() const;
-       const std::vector<QString>& annotations() const;
+       Class ann_class() const;
+       const vector<QString>& annotations() const;
 
 private:
        uint64_t start_sample_;
        uint64_t end_sample_;
 
 private:
        uint64_t start_sample_;
        uint64_t end_sample_;
-       int format_;
-       std::vector<QString> annotations_;
+       Class ann_class_;
+       vector<QString> annotations_;
 };
 
 } // namespace decode
 };
 
 } // namespace decode