603{
604 using sequence_diagram::model::method;
605 using sequence_diagram::model::participant;
606
608 return {};
609
610 const auto &sequence_model =
611 dynamic_cast<const sequence_diagram::model::diagram &>(d);
613 [&sequence_model, &p](const auto &el) {
614
615 if (el.type != config::element_filter_t::filtered_type::any &&
616 config::to_string(el.type) != p.type_name()) {
617 return false;
618 }
619
620 if (p.type_name() == "method") {
621 const auto &m = dynamic_cast<const method &>(p);
622 const auto class_id = m.class_id();
623 const auto &class_participant =
624 sequence_model.get_participant<participant>(class_id)
625 .value();
626
627 return (el.name == p.name_and_ns()) ||
628 (el.name == p.full_name(false)) ||
629 (el.name == class_participant.full_name(false));
630 }
631
632 if (p.type_name() == "objc_method") {
633 const auto &m =
634 dynamic_cast<const sequence_diagram::model::objc_method &>(
635 p);
636 const auto class_id = m.class_id();
637 const auto &class_participant =
638 sequence_model.get_participant<participant>(class_id)
639 .value();
640
641 return (el.name == p.name_and_ns()) ||
642 (el.name == p.full_name(false)) ||
643 (el.name == class_participant.full_name(false));
644 }
645
646 return el.name == p.full_name(false);
647 });
648
652 "Participant {} rejected by element_filter", p.full_name(false));
653 }
654
655 return res;
656}