42 using lib::test::showSizeof;
64 int* next () { --resNr_;
return &resNr_; }
65 bool exhausted() {
return !bool(resNr_); }
78 static const char* lumi =
"Lumiera";
104 cursor.point_at (solutions_.next());
111 Cursor& cursor =
static_cast<Cursor&
> (pos);
113 if (solutions_.exhausted())
116 cursor.point_at (solutions_.next());
131 canHandleQuery (QID qID)
const 133 return Goal::GENERIC == qID.kind
134 && (wantResultType<int> (qID)
135 ||wantResultType<string>(qID));
138 template<
typename TY>
140 wantResultType (QID qID)
const 142 return qID.type == getResultTypeID<TY>();
146 template<
typename TY>
148 resolutionFunction (
Goal const& goal)
150 QID qID = goal.getQID();
151 REQUIRE (qID.kind == Goal::GENERIC
152 && qID.type == getResultTypeID<TY>());
157 operator string()
const {
return "Test-DummyQueryResolver"; }
164 Goal::QueryID case2(Goal::GENERIC, getResultTypeID<string>());
166 installResolutionCase(case1, &resolutionFunction<int> );
167 installResolutionCase(case2, &resolutionFunction<string> );
175 buildTestQueryResolver ()
177 return testResolver();
205 explore (firstQuery.resolveBy (resolver));
208 explore (secondQuery.resolveBy(resolver));
211 template<
typename ITER>
215 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.
Simple 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.