#include <vector>
#include <pv/data/decode/annotation.hpp>
+#include <pv/data/decode/decoder.hpp>
using std::vector;
Annotation::~Annotation()
{
- if (annotations_)
- delete annotations_;
+ delete annotations_;
}
uint64_t Annotation::start_sample() const
return ann_class_id_;
}
+const QString Annotation::ann_class_name() const
+{
+ const AnnotationClass* ann_class =
+ row_->decoder()->get_ann_class_by_id(ann_class_id_);
+
+ return QString(ann_class->name);
+}
+
const vector<QString>* Annotation::annotations() const
{
return annotations_;
}
+const QString Annotation::longest_annotation() const
+{
+ return annotations_->front();
+}
+
const Row* Annotation::row() const
{
return row_;