Changeset 182be2f in Lumiera

Timestamp:
2026-10-18T22:05:15Z (4 weeks ago)
Author:
Ichthyostega <prg@…>
Branches:
dev/play
Children:
f49023f
Parents:
2130ea0
git-author:
Ichthyostega <prg@…> (18/10/26 21:04:51)
git-committer:
Ichthyostega <prg@…> (18/10/26 22:05:15)
Message:

Parameters: demonstrate type conversions and opaque value assignment

Largely this test covers already established functionality.
It is somewhat difficult to prove that an opaque type is present,
beyond showing that values are truncated or accommodated.

At the beginning of the implementation-draft, I considered a double-dispatch,
but concluded that this would be too much overhead for the standard case;
the drafted visitor-style dispatch was "parked" as Domain::transferTo.
It turned out that this implementation is not directly usable, since it
assumes that »the value buffer« is accessible, albeit as opaque ValBuff&.

As the design matured, I decided that the presence of a »Buffer« should better
not be assumed, and thus flipped the high-level-APIs around. But it is
easily possible to implement this double-dispatch scheme anew on top of
the now settled implementation scheme:

  • Disposition::assignValueTo (Disposition&) invoked on the source side
  • implemented in ParamData<VAL, IFA>::assignValueTo (Disposition&), and there delegating to the templated front-end setter Disposition::setVal(X) (which performs the second dispatch step)

It remains to be seen if such an opaque value assignement is required in practice

(No files)

Note: See TracChangeset for help on using the changeset viewer.