]> 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 071f292a8c2fa1a687295590a94b9cb5d67b3bb4..a107e0efeed7426584cbded2169ca639ffc47288 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_VIEW_DECODE_ANNOTATION_HPP
 #define PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
 
-#include <stdint.h>
+#include <cstdint>
+#include <vector>
 
 #include <QString>
 
+using std::vector;
+
 struct srd_proto_data;
 
 namespace pv {
@@ -33,19 +35,22 @@ namespace decode {
 
 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;
-       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_;
-       int format_;
-       std::vector<QString> annotations_;
+       Class ann_class_;
+       vector<QString> annotations_;
 };
 
 } // namespace decode