Lumiera  0.pre.03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AllocSpec< ARGS > Class Template Reference

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


template<typename... ARGS>
class gui::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.

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.
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 "baked in".

Definition at line 204 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)

Constructor & Destructor Documentation

AllocSpec ( FUN &&  fun)

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

References AllocSpec< ARGS >::buildPartialApplicator().

+ Here is the call graph for this function:

Member Function Documentation

static auto buildPartialApplicator ( FUN &&  fun)

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

the generated lambda captures by value

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

Referenced by AllocSpec< ARGS >::AllocSpec().

+ Here is the caller graph for this function:

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

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