43 friend Qualifier
one();
44 friend Qualifier
two(
string);
53 qualify(*
this, qual, qs...);
56 operator string ()
const 58 return "Strategy{"+prop_+
"}";
69 ExampleStrategy::Qualifier
74 strategy.prop_ =
"!one!";
79 ExampleStrategy::Qualifier
80 two(
string additionalArg)
84 strategy.prop_ +=
".two("+additionalArg+
")";
112 CHECK (f0 ==
"Strategy{∅}"_expect);
114 ExampleStrategy f1(
one());
115 CHECK (f1 ==
"Strategy{!one!}"_expect);
117 ExampleStrategy f2(
two(
"Ψ"));
118 CHECK (f2 ==
"Strategy{∅.two(Ψ)}"_expect);
120 ExampleStrategy f3(
one(),
two(
"↯"));
121 CHECK (f3 ==
"Strategy{!one!.two(↯)}"_expect);
123 ExampleStrategy f4(
two(
"☭"),
one());
124 CHECK (f4 ==
"Strategy{!one!}"_expect);
Mix-in to accept and apply an arbitrary sequence of qualifier functors.
Implementation namespace for support and library code.
Simplistic 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.