Commit graph

6945 commits

Author SHA1 Message Date
27089550d2 clean-up: relocate frame quantisation operations
The `FixedFrameQuantiser` relied on three functions from the raw-time handling library.
Since this (and NTSC drop-frame) are the only usages, these functions
can be relocated into the implemntation translation unit `lib/time/quantiser.cpp`

On closer inspection, this reveals some room for improvements:
Instead of relying on raw-computation functions written in C,
we could rather revert the dependency and express these computations
in terms of our Time-entities, which are written in C++, are much more
systematic and provide consistency checks and protection against numeric
overflow, all integrated with linear arithmetic and concise notation.

After performing these rearrangements,
most of the functions can be collapsed into ''almost nothing''.

This was taken as opportunity to re-check and improve the remaining
implementation core of the `FixedFrameQuantiser` -- the handling of
extreme corner cases can be much improved, now representing the
"grid-local time" as `Offset`, which doubles the possible value range.

The reworked unit test shows that, with this change, now the limitation
happens prior to quantisation, meaning that we always get a grid-aligned
result, even in the most extreme corner cases.
2025-05-28 23:49:01 +02:00
255fc82a1b clean-up: relocate NTSC drop-frame conversion functions
...extract these functions and the associated test
from the low-level C time handling library and
document them with a dedicated C++ header and test.

''This is unfinished work'' —
the extracted functions provide only the low level computations;
actually, a specialised time quantisation or time code would be required.

------------
Note though,
after extracting these functions, the rest of the plain-C test
can be removed, since equivalent functionality is covered in
much more detail by the tests of the C++ time handling framework.

Notably this allows to get rid of the direct component accessor functions.

------------
__Remark__: the base implementation of many time conversion functions
            and especially NTSC drop-frame was provided by Stefan Kangas

See:
6a44134833
2025-05-27 23:39:36 +02:00
55b39ae592 clean-up: retract usages of »time component access«
While these function may seem superficially plausible,
I more and more come to the conclusion that offering such
function as ''basic building blocks'' is in itself an
ill-guided approach to handling of time entities.

Time is neither „just a number“ — nor does it „contain“ hours, minutes and seconds.
It is possible to ''represent'' it through a **time-code**, which incurs
a quantisation step and implies a reference grid.

Thus Lumiera ''should not offer'' a »basic time handling library«.
Doing so would be just an invitation to bypass proper time handling
and avoid the use of more demanding but also more adequate mental concepts.

So the next step will be to remove functions not deemed adequate, and
better directly inline the respective modulus based computations.
Other functions can be integrated into the respective implementation
translation units for time quantisation and timecode representation.
2025-05-27 20:43:52 +02:00
d31d4295a4 clean-up: remove gavl_time_t as external dependency
Indeed — this change set is kind of sad.
Because I still admire the design of the GAVL library,
and would love to use it for processing of raw video.
However, up to now, we never got to the point of actually
doing so. For the future, I am not sure if there remains
room to rely on lib-GAVL, since FFmpeg roughly covers
a similar ground (and a lot beyond that). And providing
a plug-in for FFmpeg is unavoidable, practically speaking.

So I still retain the nominal dependency on lib-GAVL
in the Build system (since it is still packaged in Debian).

But it is pointless to rely on this library just for an
external type-def `gavl_time_t`. We owe much to this
inspiration, but it can be expected that we'll wrap
these raw time-values into a dedicated marker type
soon, and we certainly won't be exposing any C-style
interface for time calculations in future, since
we do not want anyone to side-step the Lumiera
time handling framework in favour of working
„just with plain numbers“


NOTE: lib-GAVL hompage has moved to Github:
      https://github.com/bplaum/gavl
2025-05-17 23:12:47 +02:00
ee6e720d00 Clean-up: sort out further leftovers from the GTK-2 UI
After the Dummy-Player (interface and prototype implementation)
is removed, some further bits of debris can be sorted out.
The first version of the Timeline was mostly rewritten and
the obsolete parts were removed in 2023, yet a small number
of files was kept around as reference for later.

Some of these are no longer considered of any information value,
other ones were moved into the widget package (and further problematic
parts were annotated, but can be still used with GTK-3)
2025-05-15 23:41:54 +02:00
017ba5f160 Clean-up: remove dummy-player services and interfaces (see #1342)
For the [ticket:1221 »Playback Vertical Slice«] one of the next steps
will be to define a way to pass buffers from the core to the UI.

The `DisplayService` and the `DummyPlayerService` where parts of an
early architecture study to see how such a flexible connection between
components in different layers can be accomplished.

The findings from this prototyping work helped to shape the design
of the actual `PlayService`...
2025-05-14 01:32:21 +02:00
8abeb02397 XV-Display: prototype for flexible control of ouput pixel format
As an example, the `PixbufDisplayer` needs packed RGB888 data,
while the `XvDisplayer` expects YUV (MPEG-style) pixels.

The research setup is not well equipped to handle any kind of content
or format negotiation; yet for the experimentation, the connections can
be wired as !SigC-Signals. After the preceding refactorings,
`DummyImageGenerator` can be configured to perform the conversion to YUV
only when necessary, and to use the working buffer flexibly.

When supplied with packed RGB pixel data, the display in the Gtk::Image
is now correct, and also handles layout and scaling appropriately.
2025-05-12 03:43:09 +02:00
b42143f425 XV-Display: refine the formulation of the image-generator
- since we now use 32bit int arithmetic (which is faster),
   we can also use the exact value of the MPEG / Rec.601 coefficients

 - and also the generation of the NTSC colour bar pattern
   can be written much simpler and cleare with C++
2025-05-11 16:06:20 +02:00
8fe50e37a4 XV-Display: reorganise image-generator code
This is a first step towards the ability to produce several different output formats...

Refactor the code to separate
 - the double buffering
 - the actual image generation, which works in RGB
 - the conversion routine

Furthermore, replace unsigned char by std::byte
and introduce std::array and structured binding
to avoid many usages of pointers; hopefully this
makes the intention of the code clearer.

Verified and cross-checked the actual converion logic;
in fact this is a conversion to "YUV" as used by MPEG,
which in more precise terms is Y'CrCb with Rec.601 colour space
and a scan range limitation (16...235) on the Luma component.
2025-05-11 01:18:19 +02:00
42ce53aa09 XV-Display: investigate and fix some problems with this XV code
Generally speaking, this experiment shows that we need some additional know-how
regarding the XVideo standard. And we should re-think the means of integration.

From some further debugging end experimenting with this code,
the following conlusions can be drawn:

- the code retrieves the GDK-Window, to which the widget was mapped
- it uses this to access an underlying X-Window
- seemingly the docking panel uses a separate X-Window, which also
  hosts the header area of the panel
- this whole underlying X-Window is treated with some compositing method,
  presumably (just guessing from the code) we use keying with a
  marker-colour. This explains why the whole area of the panel
  is no longer updated regularly
- furthermore, we need to take into account that the actual display widget
  area uses some part of this window, which can be found out from
  the VideoWidget's ''Allocation''
- when correcting the origin of the video display by using this
  allocation's origin, at least the display of the video is precisely
  at the right location and size

Furthermore, the code takes quite some shortcut and basically
looks for one specific display format, and uses the corresponding
configuration for the "port" it got.

This Format has the Abbreviation "YUY2" (packed)
2025-05-09 04:28:17 +02:00
5d3710fca8 XV-Display: the old XVideo display code indeed still works
''it basically works...''
TODO
 - the image is updated only when moving the mouse over the widget
 - calculation of window decoration is not correct
 - a strange transparent zone appears in the UI directly above the widget
2025-05-08 17:31:27 +02:00
7fd3e71936 XV-Display: partial success with the fallback / pixbuf display
The new solution is to (still) use a Gdk::Pixbuf,
because in GTK-3 the more modern alternatives are not yet provided.
But we can pass this Pixbuf directly to Gtk::Image, instead of trying
to do low-level drawing on the X-Window.

Other than that, I more or less transformed the old C-style code
into the corresponding calls in Gdkmm.

__SUCCESS__: we get **some display**
__TODO__ : the displayed image is Garbage, which means that the pixel layout is not correct
2025-05-07 18:39:11 +02:00
93a62af39e XV-Display: re-implement fallback video display technique
In cases where none of the preferred, library based approaches works,
we can attempt to provide a ''poor man's video display'' by placing the
image data into a bitmap, which can be rendered by the UI toolkit.

The existing solution for such bitmap content is the GDK Pixmap.
But note, this approach is ''deprecated with GTK-4'', since,
generally speaking, GTK moves away from the notion of an
''underlying windowing system'' and relies on the concept
of ''graphic surfaces, textures and paintables'' rather...
2025-05-06 19:41:51 +02:00
02ac4a169b XV-Display: establish wiring for the controller and verify logic
Here we face the problem that the buttons in the play control panel
need to be connected to the controller, which sits in the viewer panel.

Obviously a direct connection is not correct, since there could be
several panels, and furthermore the controller should be a service and
addressed by commands via UI-Bus.

But this is an experiment, and we'll have to figure out anyway
how the playback-display-connection works, as one of the next tasks
for the »Playback Vertical Slice«

Thus we'll use the PanelManager to fetch the first viewer panel,
and then forward to the controller calls. With this setup,
the controller logic can be verified by printing to STDOUT.

TODO: we are not yet invoking any XVideo code....
2025-05-06 03:54:03 +02:00
b0e8fa2ff6 XV-Display: introduce a new kind of docking panel for the play-control
While this is not strictly necessary for this experiment,
this is something we should try to establish early:

A »play control« should be handled as an independent UI element,
without tying it logically with some viewer (or timeline); the reason is
that such a play control needs a set of very well designed keyboard bindings,
and thus we will attempt use a focus concept to link to some active viewer
instead of creating one primary viewer, which gets the benefit of the
well accessible keybindings.

Basically we want to create an explicit association between
 - a timeline
 - some viewer
 - a play-control

Introducing a new kind of panel shows again that the `PanelManager`
needs a rework; everything there is way too much ''hard wired''

And the new panel with the play control needs an **Icon** — which is
a challenge in itself; my proposal here is to build on the film metaphor,
and combine the symbol of "Play / Pause" with an stylised film or tape player
(with the secondary idea that this icon also somewhat looks like a owl face)
2025-05-05 23:48:22 +02:00
ac5a2f371d XV-Display: build new GTK-3 widget framework and controller
- place a `DemoController` instance as direct member into the `ViewerPanel`
 - create a direct wiring, so that the `DemoController` can push to the `VideoDisplayWidget`
 - make the `DemoController` directly instantiate a `TickService` and `DummyImageGenerator`
 - reimplement play control functions by direct invocation
 - add a new class to the Lumiera CSS stylesheet
2025-05-03 23:33:44 +02:00
0ae96294e8 XV-Display: start a research project to port the existing code (see #1403)
- initial assessment shows that the Design of the **Displayer** framework is adequate
 - for context: this code originates from the »Kino« video editor 20 years ago
 - notably the `XvDisplayer` contains almost no GTK(2)-code
 - so it seems feasible to attempt a port to GTK-3

This is a limited research project, and the setup shall be based mostly on existing code.
In the early stage of the Lumiera application, we did some architecture studies
regarding ongoing video generation and display, resulting in a `DemoVideoPlayer`.

This code was broken by the GTK-3 transition, but kept in-tree for later referral.
For this research project, we can mostly short-circuit all of the layer separation
and service communication stuff and build a minimal invocation directly hooked-up
behind the GUI widget. In preparation for such a setup, the existing
demo player code is partially forked by this changeset, pushing aside
the (defunct) !DummyPlayer pseudo-subsystem.
2025-05-02 23:19:55 +02:00
998e225490 Clean-up: reimplement the SeachPathSplitter
...to be more compliant to the »Lumiera Forward Iterator« concept.
This can be easily achieved by inheriting from util::RegexSearchIter,
similar to the example in CSV.hpp

Regarding #896, I changed the string rendering to use fs::path::generic_string
where appropriate, which means that we're using the normalised path rendering
2025-04-28 19:14:27 +02:00
c5292dd0dd Clean-up: get rid of boost::filesystem
Since C++17 we can use the std::filesystem instead (and we ''do use it'' indeed)
- relocate the `/lib/file.hpp` header
- adapt the self-discovery of the executable to using std::filesystem

Furthermore, some recherche regarding XVideo and Video Output
2025-04-27 23:54:21 +02:00
555af315b3 Upgrade: improve Doxygen parameters and treat some warnings
- remove obsolete configuration settings
- walk through all settings according to the documentation
  https://www.doxygen.nl/manual/config.html
- now try to use the new feature to rely on Clang for C++ parsing
- walk through the doxygen-warnings.txt and fix some obvious misspellings
  and structural problems in the documentation comments.

With Debian-Trixie, we are now using Doxygen 1.9.8 —
which produces massively better results in various fine points.

However, there are still problems with automatic cross links,
especially from implementation to the corresponding test classes.
2025-04-27 05:00:14 +02:00
a68f145640 Upgrade: fix test-failures(3)
The Boost-Libraries changed their internal implementation
of the formula to chain hash values.

Fortunately, we had already extracted the existing implementation
from Boost 1.67 and incorporated it in-tree, in the Lumiera support libary.
After switching to that `lib:#️⃣:combine()` function, all the graph
computations related to the Scheduler-test-load can be shown to be identical.

So at the moment, the impact is still limited, but this incident highlights
the importance of a controlled, stable (and ideally also portable) hash implementation.
2025-04-25 19:54:28 +02:00
4ce936529e Upgrade: fix test-failures(2)
seems that I've played too much with »undefined behaviour« in this test;
basically we can not assume ''any'' specific placement of local variables
in a stack frame....

In this test, what I wanted to demonstrate is that the overflow-block can reside
just »anywhere«, and that HeteraoData is just a light-weight front-End and accessor.

However, I can just demonstrate that without totally ''undefined behaviour;''
placement-new can be used to force the storage at a specific location (in the UninitialiesdStorage);
continue to access and use that data after leaving the nested scope is still
kind-of borderline, yet demonstrates that the data itself is just residing in a storage block...
2025-04-25 19:02:04 +02:00
1d3cb6b23b Upgrade: fix test-failures (1)
- with Debian 12/13, the top-level `/bin`, `/sbin` and `/lib`
  are collapsed into `/usr`. Seemingly this has prompted changes
  to the way the shell prints some error messages. This broke
  the expectation of some test of the test-framework itself.

- SCons always had the policy to ''sanitise'' the invocation environment,
  to prevent unintended impact of environment settings to the test subject.
  Seemingly this now also leads to `$HOME` not being defined.
  Our file handling framework however expects to be able to expand "~"

- An old-style cast in the constructor lib::diff::Record(Mutator const&)
  is now translated into a static_cast (≙conversion); and since the appropriate
  conversion operator is missing on Mutator, the constructor attempts to
  create a temporary, by re-invoking the same constructor ⟹ Stackoverflow ↯
2025-04-24 23:39:58 +02:00
96c654f66c Upgrade: address further warnings
- conversion from pointer to bool now counts as ''narrowing conversion''
 - constructor names must not include template arguments (enforced with C++20)
 - better use std::array for some dummy test code

Several further warnings are due to known obsoleted or questionable constructs
and were left as-is (e.g. for ScopedHolder) or just commented for later referral
2025-04-15 23:40:14 +02:00
47f5390b18 Upgrade: address warnings -- shaddowing overloaded-virtual
This is an advanced diagnostics added (presumably) with GCC-13
and attempts to protect against an insidious side-effect of ''overload resolution''

Basically C++ (like its ancestor C) is oriented towards direct linkage and adds
the OO-style dynamic dispatch (through virtual functions and a VTable)
only as an extension, which must be requested explicitly.

Thus the resolution of ''overloads'' (as opposed to ''overridden'' virtual functions)
always takes precedence and happens within the directly visible scope,
which can cause the compiler to perform an implicit conversion instead of
invoking a different virtual function, which is defined in a base class.

However, this diagnostics seems to be implemented in an overly zealous way:
The compiler warns at the time of the type instantiation, and even in cases
where it is effectively impossible to encounter this dangerous shadowing situation.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109740

This leads to several ill-guided warnings in the Lumiera code base, which unfortunately
can only be addressed by disabling this diagnostics for all usages of some header.
The reason is, we often generate chains of template instantiations driven by type lists,
and in such usage pattern, it is not even possible to bring all the other inherited overloads
into scope (with a using `BASE::func` clause), because such a specification would be ambiguous
and result in a real compile error, because even the interface is generated from a chain of mix-in templates
2025-04-15 22:42:34 +02:00
bf6532a69d Upgrade: address warnings -- deprecated implicit copy
Future C++ versions will no longer generate default copy operations
once any single one was defined explicitly. So the goal is to kind-of
''enforce the rule of five'' (if you define one, define them all).

However, sometimes one of these special operators must be defined for a different reason,
e.g. because it is defined as protected, yet should not be exposed on the public API.
In such cases, any other copy operation which still is valid in the default form
must be declared explicitly ''as defaulted''

Overall this seems to be quite an improvement --
and it highlights (again) some known instances of questionable design,
which are mostly obsoleted and require clean-up anyway, or (as in the case of the
Placements) indicate »placeholder code« where the actual solution still needs to be worked out
2025-04-15 18:32:52 +02:00
2ff28236f6 Upgrade: address warnings -- pessimizing-move
Oh this is an interesting one...
GCC now highlights situations with `-Wpessimizing-move`,
where an overly zealous developer attempts to optimise by `std::move`,
which however prevents the compiler from applying the ''Return Value Optimisation''

The latter is mandatory since C++17, and essentially means that a value object
created within a function and then returned (by value) will actually be created
directly in the target location, possibly eliding a whole chain of
delegating value returns.

Thus: if we write `std::move(value)`, we change the returned type into an RValue reference,
and thereby ''force the compiler'' to invoke a move-ctor....
2025-04-15 16:46:00 +02:00
6c627d83dc Upgrade: address warnings -- obsoleted features
Some pre C++11 features are marked deprecated and will be rejected with C++20

Notably the old marker inferfaces for unary (and binary) functions are no longer needed, since function-like objects can be detected by traits or concepts nowadays

Moreover we can get rid of some boost(bind) usages and use a λ
2025-04-15 14:09:32 +02:00
92c99e5b7d Upgrade: re-enable Doxygen generation
The new version indeed works as expected,
and current Doxygen produces much better cross links
:-)
2025-04-08 05:07:58 +02:00
425f7b3f21 Upgrade: Scons Doxygen Builder from 2022
A long time ago, we grabbed this plug-in from the Scons Wiki.
The latest version from 2022-07-31 was upgraded to Python-3

Note: this merge retains our reformatted copyright header
      and the addition of a ",doxylog" file in the target dir
2025-04-08 04:17:57 +02:00
7b7821c0ee MERGE: bring in the latest Scons Doxygen Builder
Actually, the Lumiera project picked an early version of this tool in August 2008.
See the commits:
6d5cf0e642
9643f46cc8

This subtree add/merge commit brings in a consolidated history of the Scons Doxygen code
from the scons-contrib repository, combined with the old Mercurial history.

We need a current version of this tool which has been ported to Python-3
2025-04-08 04:04:42 +02:00
37a56bd564 Anchor: Directory for Scons tools 2025-04-08 04:10:02 +02:00
8fe2deed95 Upgrade: allow for build on »Trixie« with GCC-14
* need to upgrade our custom packages to current standards
 * switch those packages from CDBS to dh
 * re-build on Trixie and upgrade the Lumiera DEB-Depot

After these (in detail quite expensive) preparations,
build with Scons and GCC-14 can be started.

Fix some further (basically trivial) compile problems,
uncovered by the improved type checking of modern compilers.

Note: a tremendous amount of warnings (and depreciations) is
also indicated, which will be addressed later....
2025-04-06 18:18:52 +02:00
67fb61298a Upgrade: compile fixes for GCC-12 2025-03-16 16:52:26 +01:00
4131602593 Upgrade: disable doxygen builder (WIP)
BuilderDoxygen and BuilderGCH are external plug-ins,
not developed in this project and probably unmaintained.

TODO: decide how to fix or replace them...
2025-03-16 16:48:14 +01:00
0376fd7376 Upgrade: Fix TypeError in list concatenation
Here is the exact error message for this type of error:
TypeError: can only concatenate list (not "dict_values") to list:
2025-03-16 16:46:44 +01:00
0e8fc5889f Upgrade: comment-out code not supported in Python3
ListType not supported in types.py in Python3
 Why do we require ListType?

To do something like
   if type(item) is ListType:
       ....

But types.py does not have ListType anymore
A solution could be

   if isinstance(item, list):

TODO: WIP-remove these comments and fix the code or replace BuilderGCH
2025-03-16 16:42:37 +01:00
406275abbe Upgrade: adapt to use Scons 4.x which uses Python 3
The build system Scons switched from using Python 2.7 to using
Python 3.x, so the build breaks on, for example, Debian Bullseye.

As a first step use `ato3` to convert Python scripts from 2 to 3.
2025-03-16 16:38:07 +01:00
cc9a1e410a MERGE: prepare for upgrade and release
With the ability to invoke a Render Node graph,
the development on branch `play` reached some kind of milestone
regarding the »Playback Vertical Slice«.

This is a good opportunity to update the reference platform
and upgrade the preview releases and packaging setup accordingly.
This will include adjustments to compile on recent compilers and
upgrade the build system to support Python-3.
2025-03-16 05:09:53 +01:00
efcb456e25 Invocation: ++ Milestone ++ invoke complex render graph
Based on the building blocks developed thus far,
it was possible to assemble a typical media processing chain
 * two source nodes
 * one of these passes data through a filter
 * a mixer node on top to combine both chains
 * time-based automation for processing parameters
As actual computation, hash-chaining on blocks of
reproducible random data was used, allowing to verify
for every data word that expected computations were
carried out, in the expected order.
2025-02-19 23:27:52 +01:00
93812d5a6d Invocation: build a complex Render Node network for integration test
Using basically the same topology as in the preceding test, which focused on connectivity. However, in this case we retrieve actual processing functions from the »Test-Rand« ontology in order to perform hash-chaining computations on full data blocks. And, in addition, a »Param Agent Node« is used.
2025-02-19 19:37:55 +01:00
6c2761b337 Invocation: complement NodeBase_test with simple example
While initially intended as introductory test, it meanwhile
focuses on intricate technical details on the level of
basic building blocks, notably the `FeedManifold`

Now I have added a simple end-to-end demonstration example
how a Render Node is built from scratch, leaving out all
technical details and all convenience front-ends like
the `NodeBuilder` — just one dummy port invoked directly.
2025-02-19 01:30:54 +01:00
8a4060861f Invocation: complete simple test case regarding TurnoutSystem
NodeBase_test demonstrates the building blocks of a Render Node,
and verifies low-level mechanics of those building blocks, which
can be quite technical. At the top of this test however are some
very basic interactions, which serve as an introduction.

__Remark__: renamed the low-level technical dispatch-access
for the parameter-accessors in `TurnoutSystem` to be more obvious,
and added comment (I was confused myself how to use them properly)
2025-02-18 23:55:58 +01:00
b7fc2df478 Invocation: NodeBuilder now handles all cases of partial-closure
This is a crucial feature, discovered only late, while building
an overall integration test: it is quite common for processing functionality
to require both a technical, and an artistic parametrisation. Obviously,
both are configured from quite different sources, and thus we need a way
to pre-configure ''some parameter values,'' while addressing other ones
later by an automation function. Probably there will be further similar
requirements, regarding the combination of automation and fixed
user-provided settings (but I'll leave that for later to settle).

On a technical level, wiring such independent sources of information
can be quite a challenging organisational problem — which however can be
decomposed using ''partial function closure'' (as building a value tuple
can be packaged into a builder function). Thus in the end I was able to
delegate a highly technical problem to an existing generic library function.
2025-02-18 20:42:25 +01:00
e014d88b2c Invocation: complete closure-helper and tests
* now able to demonstrate close-front, close-back and close-argument
 * can also apply the same cases to `std::array`, with input and
   output type seamlessly adapted to `std::array`
2025-02-18 00:24:55 +01:00
89f839854c Invocation / Library: analyse perfect-forwarding in function-closure
__Summary__:
 * the first part to prepare a binding involves creating a mapped tuple,
   with re-ordered elements and some elements replaced by placehoder-markers.
   This part **must not use RValue-References** (doing so would be possible
   only under very controlled conditions)
 * the second part, which transports these mapped-tuple elements into the binder
   ''could be converted to perfect-forwarding.'' This would require to replace
   the `Apply<N>' by a variadic template, delegating to `std::apply` and `std::bind`

With this changeset, I have modernised a lot of typedefs to make them more legible,
and I have introduced perfect-forwarding in the entrance path, up to the point
where the values are passed to `TupleConstructor`.
2025-02-17 23:34:06 +01:00
a5a3d46b6a Invocation: generalise partial-closure cases
With these additions, all conceivable cases are basically addressed.

Take this as opportunity to investigate how the existing implementation
transports values into the Binder, where they will be stored as data fields.
Notably the mechanism of the `TupleConstructor` / `ElmMapper` indeed
''essentially requires'' to pass the initialisers ''by-reference'',
because otherwise there would be limitations on possible mappings.

This implies that not much can be done for ''perfect forwarding'' of initialisers,
but at least the `BindToArgument` can be simplified to take the value directly.
2025-02-17 21:18:37 +01:00
0cad2dacc0 Invocation: build a solution to adapt std::array
...which should ''basically work,'' since `std::array` is ''»tuple-like«'' —
BUT unfortunately it has a quite distinct template signature which does not fit
into the generic scheme of a product type.

Obviously we'd need a partial specialisation, but even re-implementing this
turns out to be damn hard, because there is no way to generate a builder method
with a suitable explicit type signature directly, because such a builder would
need to accept precisely N arguments of same type. This leads to a different
solution approach: we can introduce an ''adapter type'', which will be layered
on top of `std::array` and just expose the proper type signature so that the
existing Implementation can handle the array, relying on the tuple-protocol.


__Note__: this changeset adds a convenient pretty-printer for `std::array`,
based on the same forward-declaration trick employed recently for `lib::Several`.
You need to include 'lib/format-util.hpp' to actually use it.
2025-02-17 18:36:23 +01:00
8bb332cc5e Invocation: reorganise and add test 2025-02-16 23:40:43 +01:00
769060b9dd Invocation: extract partial closure functionality
What emerges here, seems to be a generic helper to handle
partial closure of ''tuple-like'' data records. In any case,
this is highly technical meta-programming code and mandates
extraction into a separate header — simplifying `NodeBuilder`
2025-02-16 23:16:46 +01:00