]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/rowdata.cpp
Implement hidable rows
[pulseview.git] / pv / data / decode / rowdata.cpp
index 02859b2790a5b10f7979653ccc1ff41f8000e84c..d3d14f9bd56fb7d2b3c275f5185775ca12dceab8 100644 (file)
@@ -32,6 +32,11 @@ uint64_t RowData::get_max_sample() const
        return annotations_.back().end_sample();
 }
 
+uint64_t RowData::get_annotation_count() const
+{
+       return annotations_.size();
+}
+
 void RowData::get_annotation_subset(
        vector<pv::data::decode::Annotation> &dest,
        uint64_t start_sample, uint64_t end_sample) const
@@ -42,9 +47,9 @@ void RowData::get_annotation_subset(
                        dest.push_back(annotation);
 }
 
-void RowData::push_annotation(const Annotation &a)
+void RowData::emplace_annotation(srd_proto_data *pdata, const Row *row)
 {
-       annotations_.push_back(a);
+       annotations_.emplace_back(pdata, row);
 }
 
 }  // namespace decode