MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/xstudio / intersect

Method intersect

include/xstudio/utility/container.hpp:724–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722
723template <typename V>
724std::optional<UuidTree<V>> UuidTree<V>::intersect(const std::vector<Uuid> &uuids) const {
725 // build new tree from selection
726
727 std::list<UuidTree<V>> children;
728
729 for (const auto &i : children_) {
730 auto ii = i.intersect(uuids);
731 if (ii)
732 children.emplace_back(*ii);
733 }
734
735 if (not children.empty() or std::find(uuids.begin(), uuids.end(), uuid_) != uuids.end()) {
736 // preserve..
737 auto result = UuidTree<V>();
738 result.uuid_ = uuid_;
739 result.value_ = value_;
740 result.children_ = children;
741 return result;
742 }
743
744 return {};
745}
746
747} // namespace xstudio::utility

Callers 5

filterAcceptsRowMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
message_handlerMethod · 0.45
START_SLOW_WATCHERFunction · 0.45

Calls 3

emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36