Lumiera
0.pre.03
»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 | |
bool | canHandle (Goal const &) const |
PReso | issue (Goal const &query) const |
issue a query to retrieve contents The query is handed over internally to a suitable resolver implementation. More... | |
virtual | operator string () const =0 |
short characterisation of the actual facility | |
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) |
Private Attributes | |
unique_ptr< QueryDispatcher > | dispatcher_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
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.