Lumiera  0.pre.03
defs-registry.hpp File Reference

Go to the source code of this file.


A piece of implementation code factored out into a separate header (include).

Only used through defs-manager-impl.hpp and for the unit tests. We can't place it into a separate compilation unit, because config-resolver.cpp defines some explicit template instantiation, which cause the different Slots of the DefsrRegistry::table_ to be filled with data and defaults for the specific Types.

Basically, this piece of code defines a specialised index / storage table to hold Queries-for-default objects. This allows to remember what actually was used as "default" solution for some query and to oder possible default solutions.

as of 2017, we're still using a fake implementation of the resolution, no real resolution engine. While the basic idea of this "defaults registry" is likely to stay, the actual order relation and maybe even the components to be stored in this registry might be subject to change.
See also

Definition in file defs-registry.hpp.

#include "lib/p.hpp"
#include "lib/util.hpp"
#include "lib/util-foreach.hpp"
#include "lib/sync-classlock.hpp"
#include "lib/format-string.hpp"
#include "lib/query-util.hpp"
#include "common/query.hpp"
#include "lib/nocopy.hpp"
#include <set>
#include <vector>
#include <memory>


class  DefsRegistry
class  DefsRegistry::Iter< TAR >
 used for enumerating solutions More...
struct  Record< TAR >
 holding a single "default object" entry More...
struct  Record< TAR >::Search
 < Functor searching for a specific object More...
struct  Slot< TAR >
 every new kind of object (Type) creates a new slot in the main Table holding all registered default objects. More...
struct  TableEntry


typedef std::vector< P< TableEntry > > Table
 we maintain an independent defaults registry for every participating kind of object. More...


 Lumiera public interface.