33 using lib::test::showSizeof;
55 int* next () { --resNr_;
return &resNr_; }
56 bool exhausted() {
return !bool(resNr_); }
69 static const char* lumi =
"Lumiera";
95 cursor.point_at (solutions_.next());
102 Cursor& cursor =
static_cast<Cursor&
> (pos);
104 if (solutions_.exhausted())
107 cursor.point_at (solutions_.next());
122 canHandleQuery (QID qID)
const 124 return Goal::GENERIC == qID.kind
125 && (wantResultType<int> (qID)
126 ||wantResultType<string>(qID));
129 template<
typename TY>
131 wantResultType (QID qID)
const 133 return qID.type == getResultTypeID<TY>();
137 template<
typename TY>
139 resolutionFunction (
Goal const& goal)
141 QID qID = goal.getQID();
142 REQUIRE (qID.kind == Goal::GENERIC
143 && qID.type == getResultTypeID<TY>());
148 operator string()
const {
return "Test-DummyQueryResolver"; }
155 Goal::QueryID case2(Goal::GENERIC, getResultTypeID<string>());
157 installResolutionCase(case1, &resolutionFunction<int> );
158 installResolutionCase(case2, &resolutionFunction<string> );
166 buildTestQueryResolver ()
168 return testResolver();
196 explore (firstQuery.resolveBy (resolver));
199 explore (secondQuery.resolveBy(resolver));
202 template<
typename ITER>
206 cout <<
"Query-Results: " << showSizeof(ii) << endl;
Query ABC: unspecific goal for resolution or retrieval.
a (dummy) concrete query resolution facility.
auto explore(IT &&srcSeq)
start building a IterExplorer by suitably wrapping the given iterable source.
Interface: a facility for resolving (some kind of) queries A concrete subclass has the ability to cre...
ABC representing the result set of an individual query resolution.
framework and to resolve logical queries.
a concrete "resolution" of the query is a set of "solutions", which can be explored by iteration...
Access point to singletons and other kinds of dependencies designated by type.
Simplistic test class runner.
A collection of frequently used helper functions to support unit testing.
an sequence of "solutions" to be "found"
Singleton services and Dependency Injection.
Lumiera public interface.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
Single Solution, possibly part of a result set.