![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "common/query/query-resolver.hpp"
Interface: a facility for resolving (some kind of) queries A concrete subclass has the ability to create Resolution instances in response to specific queries of some kind, if applicable.
Every resolution mechanism is expected to enrol by calling installResolutionCase. Such a registration is considered permanent; a factory function gets stored, assuming that the entity to implement this function remains available up to the end of Lumiera main(). The kind of query and a suitable resolver is determined by the QueryID, which includes a type-ID. Thus the implementation might downcast query and resultset.
Definition at line 98 of file query-resolver.hpp.
Public Member Functions | |
| virtual | ~QueryResolver () |
| virtual | operator string () const =0 |
| short characterisation of the actual facility | |
| PReso | issue (Goal const &query) const |
| issue a query to retrieve contents The query is handed over internally to a suitable resolver implementation. | |
| bool | canHandle (Goal const &) const |
Protected Types | |
| using | ResolutionMechanism = function< Resolution *(Goal const &)> |
Protected Member Functions | |
| virtual bool | canHandleQuery (Goal::QueryID const &) const =0 |
| void | installResolutionCase (Goal::QueryID const &, ResolutionMechanism) |
| QueryResolver () | |
Private Attributes | |
| unique_ptr< QueryDispatcher > | dispatcher_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
virtual |
Definition at line 40 of file query-resolver.cpp.
|
protected |
Definition at line 82 of file query-resolver.cpp.
|
protected |
Definition at line 128 of file query-resolver.hpp.
|
pure virtual |
short characterisation of the actual facility
Implemented in DummyTypedSolutionProducer, and PlacementIndexQueryResolver.
issue a query to retrieve contents The query is handed over internally to a suitable resolver implementation.
| lumiera::Error | subclass if query evaluation flounders. This might be broken logic, invalid input, misconfiguration or failure of an external facility used for resolution. |
Definition at line 98 of file query-resolver.cpp.
References QueryResolver::canHandle(), and QueryResolver::dispatcher_.
Referenced by Query< RES >::resolveBy().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 161 of file query-resolver.hpp.
References QueryResolver::canHandleQuery(), and Goal::getQID().
Referenced by QueryResolver::issue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in PlacementIndexQueryResolver.
Referenced by QueryResolver::canHandle().
Here is the caller graph for this function:
|
protected |
Definition at line 110 of file query-resolver.cpp.
References QueryResolver::dispatcher_.
Referenced by PlacementIndexQueryResolver::defineHandling().
Here is the caller graph for this function:
|
private |
Definition at line 101 of file query-resolver.hpp.
Referenced by QueryResolver::installResolutionCase(), and QueryResolver::issue().
Inheritance diagram for QueryResolver:
Collaboration diagram for QueryResolver: