35 #ifndef LUMIERA_QUERY_RESOLVER_H 36 #define LUMIERA_QUERY_RESOLVER_H 50 using std::unique_ptr;
82 iterNext (PReso& resultSet, Result& pos)
84 resultSet->nextResult(pos);
88 virtual Result prepareResolution() =0;
92 virtual void nextResult(Result& pos) =0;
110 unique_ptr<QueryDispatcher> dispatcher_;
116 virtual operator string ()
const =0;
127 PReso issue (
Goal const& query)
const;
129 bool canHandle (
Goal const&)
const;
137 using ResolutionMechanism = function<Resolution*(Goal const&)>;
140 ResolutionMechanism);
148 template<
typename RES>
152 PReso resultSet = resolver.
issue (*
this);
153 Result first = resultSet->prepareResolution();
154 Cursor& start =
static_cast<Cursor&
> (first);
155 return iterator (resultSet, start);
161 template<
typename RES>
165 return resolveBy (resolver);
170 QueryResolver::canHandle(
Goal const& query)
const 172 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.