40 template<
typename SubSelector, std::enable_if_t<!std::is_po
inter_v<SubSelector>,
bool> = true>
41 void processSubSelector(SubSelector&& subSelector) {
42 mSubSelectors << _new<SubSelector>(std::forward<SubSelector>(subSelector));
45 template<
typename SubSelector, std::enable_if_t<std::is_po
inter_v<SubSelector>,
bool> = true>
46 void processSubSelector(SubSelector&& subSelector) {
47 mSubSelectors << _<IAssSubSelector>(subSelector);
50 template<
typename SubSelector,
typename...SubSelectors>
51 void processSubSelectors(SubSelector&& subSelector, SubSelectors&&... subSelectors) {
52 processSubSelector(std::forward<SubSelector>(subSelector));
53 processSubSelectors(std::forward<SubSelectors>(subSelectors)...);
56 void processSubSelectors() {}
59 template<
typename...SubSelectors>
60 AAssSelector(SubSelectors&&... subSelectors) {
61 processSubSelectors(std::forward<SubSelectors>(subSelectors)...);
63 AAssSelector(AAssSelector&& move)
noexcept: mSubSelectors(std::move(move.mSubSelectors)) {
66 explicit AAssSelector(std::nullptr_t) {}
67 AAssSelector(
const AAssSelector&) =
default;
70 mSubSelectors.clear();
73 AAssSelector& operator=(
const AAssSelector&
c) =
default;
75 bool isPossiblyApplicable(
AView* view)
const {
76 for (
const auto& s : mSubSelectors) {
77 if (s->isPossiblyApplicable(view)) {
84 bool isPossiblyApplicable(
AView* view)
override {
85 return constMe()->isPossiblyApplicable(view);
88 bool isStateApplicable(
AView* view)
const {
89 for (
const auto& s : mSubSelectors) {
90 if (s->isStateApplicable(view)) {
96 bool isStateApplicable(
AView* view)
override {
97 return constMe()->isStateApplicable(view);
101 constMe()->setupConnections(view, helper);
103 template<
typename SubSelector, std::enable_if_t<!std::is_po
inter_v<SubSelector>,
bool> = true>
104 void addSubSelector(SubSelector&& subSelector) {
105 processSubSelector(std::forward<SubSelector>(subSelector));
110 return mSubSelectors;
113 static AAssSelector makeCopy(
const AAssSelector& from) {
115 result.mSubSelectors = from.mSubSelectors;
120 const AAssSelector* constMe() {
122 return const_cast<const AAssSelector*
>(
this);