Lumiera  0.pre.03
»edit your freedom«
defs-registry.hpp File Reference

Go to the source code of this file.

Description

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.

Remarks
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
mobject::session::DefsManager
DefsRegistryImpl_test

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>

Classes

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
 

Typedefs

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

Functions

uint maxSlots (0)
 number of different registered Types
 

Variables

_Fmt dumpRecord ("%2i| %64s --> %s\)
 

Namespaces

 lumiera
 Lumiera public interface.
 

Typedef Documentation

◆ Table

typedef std::vector< P<TableEntry> > Table

we maintain an independent defaults registry for every participating kind of object.

Definition at line 90 of file defs-registry.hpp.