52 friend Qualifier
one();
53 friend Qualifier
two(
string);
62 qualify(*
this, qual, qs...);
65 operator string ()
const 67 return "Strategy{"+prop_+
"}";
78 ExampleStrategy::Qualifier
83 strategy.prop_ =
"!one!";
88 ExampleStrategy::Qualifier
89 two(
string additionalArg)
93 strategy.prop_ +=
".two("+additionalArg+
")";
121 CHECK (f0 ==
"Strategy{∅}"_expect);
123 ExampleStrategy f1(
one());
124 CHECK (f1 ==
"Strategy{!one!}"_expect);
126 ExampleStrategy f2(
two(
"Ψ"));
127 CHECK (f2 ==
"Strategy{∅.two(Ψ)}"_expect);
129 ExampleStrategy f3(
one(),
two(
"↯"));
130 CHECK (f3 ==
"Strategy{!one!.two(↯)}"_expect);
132 ExampleStrategy f4(
two(
"☭"),
one());
133 CHECK (f4 ==
"Strategy{!one!}"_expect);
Mix-in to accept and apply an arbitrary sequence of qualifier functors.
Implementation namespace for support and library code.
Simple test class runner.
A collection of frequently used helper functions to support unit testing.
ExampleStrategy::Qualifier two(string additionalArg)
definition of another qualifier two(arg), accepting an additional argument
Mix-in to support builder functions to accept optional qualifier terms.
ExampleStrategy::Qualifier one()
definition of a qualifier one()
Example "strategy" class, which can be configured with additional qualifiers at construction.