Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Interface for accessing rule based configuration.
By using the Query template, you can pose a query in prolog syntax and get some existing or newly created object fulfilling the requested predicates. The actual implementation will be hidden behind a instance
(Singleton factory). As of 1/2008, it is planned to use an embedded YAP Prolog system at some point in the future, for now we use a mock implementation based on lookup in a hard-wired, preconfigured Map.
Fully implementing this facility would require the participating objects to register capabilities they want to provide, together with functors carrying out the necessary configuration steps. All details and consequences of this approach still have to be worked out...
right now (12/2012) the above paragraph is a lie. ConfigQuery is way older than QueryResolver and will be retrofitted step by step. Not much of a problem, since the currently utilised mock implementation isn't able to deal with a real query anyway.
as of 11/2016 the situation is basically the same: this is placeholder code and just implemented enough to keep us going without violating the architecture vision
Definition in file config-rules.hpp.
#include "lib/p.hpp"
#include "lib/symbol.hpp"
#include "lib/meta/generator.hpp"
#include "common/query.hpp"
#include <string>
Classes | |
class | ConfigRules< TYPES > |
Generic query interface for retrieving objects matching some capability query. More... | |
class | Pred< SYM, SIG > |
class | QueryHandler< TY > |
the "front side" interface: the Steam-Layer code can use this QueryHandler to retrieve instances of the type TY fulfilling the given Query. More... | |
class | Resolver |
class | TypeHandler< TY > |
the "back side" interface towards the classes participating in the configuration system (the config system will be delivering instances of these classes for a given query). More... | |
Macros | |
#define | SYMBOL uint |
placeholder definition for later. More... | |
Functions | |
bool | isFakeBypass (lumiera::QueryKey const &q) |
LUMIERA_ERROR_DECLARE (CAPABILITY_QUERY) | |
unresolvable capability query. | |
void | setFakeBypass (lumiera::QueryKey const &q) |
backdoor for tests: the next config query with this query string will magically succeed with every candidate object provided. More... | |
Namespaces | |
lumiera | |
Lumiera public interface. | |
#define SYMBOL uint |
placeholder definition for later.
Definition at line 107 of file config-rules.hpp.
void setFakeBypass | ( | lumiera::QueryKey const & | q | ) |
backdoor for tests: the next config query with this query string will magically succeed with every candidate object provided.
This is currently necessary to get objects into the defaults manager, as the query system is not able to do real query resolution
Definition at line 48 of file config-rules.cpp.
References lumiera::query::setFakeBypass().
Referenced by lumiera::query::setFakeBypass().