26 #ifndef LUMIERA_QUERY_RESOLVER_H 27 #define LUMIERA_QUERY_RESOLVER_H 41 using std::unique_ptr;
73 iterNext (PReso& resultSet, Result& pos)
75 resultSet->nextResult(pos);
79 virtual Result prepareResolution() =0;
83 virtual void nextResult(Result& pos) =0;
101 unique_ptr<QueryDispatcher> dispatcher_;
107 virtual operator string ()
const =0;
118 PReso issue (
Goal const& query)
const;
120 bool canHandle (
Goal const&)
const;
128 using ResolutionMechanism = function<Resolution*(Goal const&)>;
131 ResolutionMechanism);
139 template<
typename RES>
143 PReso resultSet = resolver.
issue (*
this);
144 Result first = resultSet->prepareResolution();
145 Cursor& start =
static_cast<Cursor&
> (first);
146 return iterator (resultSet, start);
152 template<
typename RES>
156 return resolveBy (resolver);
161 QueryResolver::canHandle(
Goal const& query)
const 163 return canHandleQuery (query.getQID());
Query ABC: unspecific goal for resolution or retrieval.
PImpl of the generic QueryResolver.
std::shared_ptr< Resolution > PReso
Allow to take and transfer ownership of a result set.
Interface: a facility for resolving (some kind of) queries A concrete subclass has the ability to cre...
Basic and generic representation of an internal query.
ABC representing the result set of an individual query resolution.
Helper template(s) for creating Lumiera Forward Iterators.
Any copy and copy construction prohibited.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
iterator operator()(QueryResolver const &resolver) const
notational convenience shortcut, synonymous to Query<RES>::resolveBy()
PReso issue(Goal const &query) const
issue a query to retrieve contents The query is handed over internally to a suitable resolver impleme...
Lumiera public interface.
friend bool checkPoint(PReso const &, Result const &pos)
IterAdapter attached here.
Adapter for building an implementation of the »Lumiera Forward Iterator« concept. ...
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
Single Solution, possibly part of a result set.