Lumiera
0.pre.03
»edit your freedom«
|
#include "common/query/defs-registry.hpp"
Helper for organising preconfigured default objects. Maintains a collection of objects known or encountered as "default" for a given type. This collection is ordered by "degree of constriction", which is implemented by counting the number of predicates in the query used to define or identify each object. Accessing an object identified by a query causes the query to be resolved (executed in prolog), which may result in some additional properties of the object being bound or specified.
Definition at line 195 of file defs-registry.hpp.
Public Member Functions | |
template<class TAR > | |
Iter< TAR > | candidates (Query< TAR > const &query) |
find a sequence of "default" objects possibly matching the query. More... | |
template<class TAR > | |
string | dump () |
helper for diagnostics. More... | |
template<class TAR > | |
bool | forget (P< TAR > const &obj) |
if this object is registered as "default" in some way, drop the registration. More... | |
template<class TAR > | |
bool | put (P< TAR > const &obj, Query< TAR > const &query) |
register the object as being "default" when searching something similar as designated by the given query. More... | |
Classes | |
class | Iter |
used for enumerating solutions More... | |
Private Attributes | |
Table | table_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
find a sequence of "default" objects possibly matching the query.
If there was a registration for some object of the given kind with the same query, this one will be first in the sequence. Besides, the sequence will yield all still existing registered "default" objects of this kind, ordered ascending by "degree of constriction", i.e. starting with the object registered together with the shortest query.
Definition at line 259 of file defs-registry.hpp.
References steam::mobject::session::query::anonymous_namespace{fake-configrules.cpp}::entry().
register the object as being "default" when searching something similar as designated by the given query.
Only a weak ref is stored.
obj | to be recorded as "default". Only a weak pointer will be stored |
true | if object has actually been stored |
false | if another object is registered for exactly the same query Nothing is changed in this case |
Definition at line 286 of file defs-registry.hpp.
References steam::mobject::session::query::anonymous_namespace{fake-configrules.cpp}::entry().
|
inline |
if this object is registered as "default" in some way, drop the registration.
Definition at line 316 of file defs-registry.hpp.
|
inline |
helper for diagnostics.
Definition at line 331 of file defs-registry.hpp.
References steam::mobject::session::query::anonymous_namespace{fake-configrules.cpp}::entry().