343{
346 dynamic_cast<const package *>(&e) != nullptr) {
349 if (std::holds_alternative<namespace_>(nsit.value())) {
350 const auto &ns_pattern = std::get<namespace_>(nsit.value());
351
352 auto element_full_name_starts_with_namespace =
353 namespace_{e.name_and_ns()}.starts_with(ns_pattern);
354
355 auto element_full_name_equals_pattern =
357
358 auto pattern_starts_with_element_full_name =
360
361 auto result = element_full_name_starts_with_namespace ||
362 element_full_name_equals_pattern;
363
365 result =
366 result || pattern_starts_with_element_full_name;
367
368 return result;
369 }
370
371 return std::get<common::regex>(nsit.value()) %=
372 e.full_name(false);
373 });
374
378 "Element {} rejected by namespace_filter", e.full_name(false));
379 }
380
381 return res;
382 }
383
387 if (std::holds_alternative<namespace_>(nsit.value())) {
388 auto e_ns = namespace_{e.full_name(false)};
389 auto nsit_ns = std::get<namespace_>(nsit.value());
390
392 return e_ns.starts_with(nsit_ns) ||
393 nsit_ns.starts_with(e_ns) || e_ns == nsit_ns;
394
395 return e_ns.starts_with(nsit_ns) || e_ns == nsit_ns;
396 }
397
398 return std::get<common::regex>(nsit.value()) %=
399 e.full_name(false);
400 });
401
405 "Element {} rejected by namespace_filter", e.full_name(false));
406 }
407 return res;
408 }
409
412 if (std::holds_alternative<namespace_>(nsit.value())) {
413 return e.get_namespace().starts_with(
414 std::get<namespace_>(nsit.value()));
415 }
416
417 return std::get<common::regex>(nsit.value()) %= e.full_name(false);
418 });
419
423 "Element {} rejected by namespace_filter", e.full_name(false));
424 }
425 return res;
426}