Lumiera  0.pre.03
»edit your freedom«
AllocSpec< ARGS > Class Template Reference

#include "stage/interact/view-spec-dsl.hpp"

Description

template<typename... ARGS>
class stage::interact::AllocSpec< ARGS >

A specification to describe the strategy for allocating (placing, retrieving) a component view.

On a DSL-technical level, AllocSpec is a function generator: it produces Allocator entities, which in turn are functions to perform the actual allocation.

Note
AllocSpec relies on a specific convention how to specify the actual allocation operation:
  • the operation takes one main argument and additional parameters
  • its first argument is the work triggering argument, namely the concrete UI coordinates passed to the Allocator, requesting to create or retrieve or claim the view at that location
  • the additional argument(s) serves for parametrisation or specialisation of the strategy; they will be "baked" into the generated allocator.
Remarks
to give a typical example: an allocation operation might want to limit the number of generated views per window and take this instance limit as additional parameter. But for the DSL we want a allocation spec of the form limitPerWindow(cnt) – which is a function accepting the concrete limit and producing the actual allocator function UICoord -> UICoord, which has this actual limit cnt "baked in".

Definition at line 205 of file view-spec-dsl.hpp.

Public Member Functions

template<class FUN >
 AllocSpec (FUN &&fun)
 

Static Private Member Functions

template<class FUN >
static auto buildPartialApplicator (FUN &&fun)
 

Member Function Documentation

◆ buildPartialApplicator()

static auto buildPartialApplicator ( FUN &&  fun)
inlinestaticprivate

analyse and dissect the given allocation operation and fabricate a builder to accept the additional arguments and produce a partially closed allocation functor

Note
the generated lambda captures by value

Definition at line 214 of file view-spec-dsl.hpp.

+ Inheritance diagram for AllocSpec< ARGS >:
+ Collaboration diagram for AllocSpec< ARGS >:

The documentation for this class was generated from the following file: