]> sigrok.org Git - pulseview.git/blobdiff - pv/view/rowitemowner.cpp
RowItemOwner: Added list_row_item_owners
[pulseview.git] / pv / view / rowitemowner.cpp
index 8970f45a73727207fae763043efbb6df66467c21..ba2e1f4838ab44874b831b7ad06d9b79c12dd70c 100644 (file)
@@ -27,6 +27,7 @@ using std::max;
 using std::make_pair;
 using std::min;
 using std::pair;
 using std::make_pair;
 using std::min;
 using std::pair;
+using std::set;
 using std::shared_ptr;
 using std::vector;
 
 using std::shared_ptr;
 using std::vector;
 
@@ -92,6 +93,14 @@ RowItemOwner::const_iterator RowItemOwner::end() const
        return const_iterator(this);
 }
 
        return const_iterator(this);
 }
 
+set< RowItemOwner* > RowItemOwner::list_row_item_owners()
+{
+       set< RowItemOwner* > owners;
+       for (const auto &r : *this)
+               owners.insert(r->owner());
+       return owners;
+}
+
 pair<int, int> RowItemOwner::v_extents() const
 {
        pair<int, int> extents(INT_MAX, INT_MIN);
 pair<int, int> RowItemOwner::v_extents() const
 {
        pair<int, int> extents(INT_MAX, INT_MIN);