33 #ifndef LUMIERA_QUERY_DEFS_MANAGER_IMPL_H 34 #define LUMIERA_QUERY_DEFS_MANAGER_IMPL_H 59 INFO (
session,
"Configure technical defaults of the session.");
88 typeHandler.
resolve (res, capabilities);
102 typeHandler.
resolve (res, capabilities);
104 defsRegistry_->put (res, capabilities);
113 P<TAR> candidate (defaultObj);
115 typeHandler.
resolve (candidate, capabilities);
119 return defsRegistry_->put (candidate, capabilities);
127 return defsRegistry_->forget (defaultObj);
139 res =
create (capabilities);
143 % capabilities.rebuild().asKey()
144 , LERR_(CAPABILITY_QUERY) );
used for enumerating solutions
bool define(lib::P< TAR > const &, Query< TAR > const &=Query< TAR >())
register the given object as default, after ensuring it fulfils the query.
the "front side" interface: the Steam-Layer code can use this QueryHandler to retrieve instances of t...
lib::P< TAR > operator()(Query< TAR > const &)
common access point: retrieve the default object fulfilling some given conditions.
virtual bool resolve(P< TY > &solution, Query< TY > const &q)=0
try to find or create an object of type TY fulfilling the given query.
lib::P< TAR > create(Query< TAR > const &)
retrieve an object fulfilling the query and register it as default.
DefsManager() noexcept
initialise the most basic internal defaults.
A front-end for using printf-style formatting.
Namespace of Session and user visible high-level objects.
lib::P< TAR > search(Query< TAR > const &)
search through the registered defaults, never create anything.
Management of defaults and default rules.
Derived specific exceptions within Lumiera's exception hierarchy.
A piece of implementation code factored out into a separate header (include).
bool forget(lib::P< TAR > const &)
remove the defaults registration of the given object, if there was such
Lumiera error handling (C++ interface).
Lumiera public interface.
Interface for accessing rule based configuration.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
user-visible Interface to the ConfigRules subsystem.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...