Commit graph

1543 commits

Author SHA1 Message Date
4348cd462c Metaprogramming: extend testcase and remould pickInit to support arbitrary arguments
as it turned out, the solution from yesterday works only with uniform argument lists,
but not with arbitrarily mixed types. Moreover the whole trickery with the
indices was shitty -- better use a predicate decision on template argument level.
This simple solution somehow just didn't occur to me...
2017-09-29 02:35:15 +02:00
636ab6e608 Metaprogramming: integrate the new facilities into the library 2017-09-29 00:51:13 +02:00
dc35a1a6e5 Investigation: add a solution for default initialisation of missing arguments
...still somewhat unsatisfactory, because
- no clear compile error message when invoking pickArg with insufficient arguments
- the default initialisation case in SelectVararg is duplicated and messy
2017-09-28 03:58:09 +02:00
3f9565a156 Investigation: augment index iterator to deal with insufficient arguments
basically we want "all the rest" of the arguments to go to the recursive delegate
2017-09-28 01:40:23 +02:00
3f8606c474 Metaprogramming(#987): extract some variadic sequence helpers
some time ago we abandoned our own tuple type in favour of std::tuple
Since then, the helpers and ported utilities provide some generic helpers
to deal with variadic argument sequences, especially to build index sequences,
which in turn can be used to "pick" individual arguments from a variadic parameter pack.

The expectation is for this part of the support library gradually to grow and
in parts to replace the existing type sequence processing helpers. The expectation
is that we'll retain the basic type sequence, lib::meta::Types, but retrofit it
to rely on variadic arguments
2017-09-28 00:19:52 +02:00
4b67521e26 Metaprogramming(#987): mark planned transition to variadic arguments
since the adoption of C++11, we gradually transition our metaprogramming helpers
to support and rely on variadic template parameters. For the time being,
we just augment existing facilities when it comes in handy, yet some more
heavyweight lifting and overall clean-up remains to be done eventually.
2017-09-28 00:10:45 +02:00
3ad3f11f1e Investigation: slightly improved similar solution 2017-09-27 02:46:01 +02:00
e5dc7ba2bc Investigation: dissect argument packs
start investigation on generic techniques to dissect an variadic argument pack
2017-09-26 19:23:03 +02:00
372512006f UI-Coordinates: use a recursive implementation layout
this is a more or less arbitrary guess regaring performance requirements
2017-09-25 00:26:19 +02:00
5e1c25aaf5 UI-Coordinates: extract PathArray base abstraction into a library class 2017-09-24 22:50:42 +02:00
4082526ec6 UI-Coordinates: stub basic path element iteration 2017-09-24 21:14:26 +02:00
937ad64596 DiffMessage: now uniformly plays the role of MutationMessage (closes #1066) 2017-08-13 07:25:32 +02:00
82a12115c3 DiffMessage: complete documentation 2017-08-13 07:25:32 +02:00
f7402ef89d Library: allow to consume an iterator while taking the snapshot 2017-08-13 07:25:32 +02:00
255958b23b Library: fix yet another misconception in iterator comparison
...again the situation when we want to use Lumiera iterators
in a stadard "for each" loop
2017-08-13 00:07:38 +02:00
7e9bb1fb5d DiffMessage: elaborate integration test... 2017-08-12 23:02:00 +02:00
b45ffe5cbe DiffMessage: fix insidious initialisation bug (related to #963)
basically DiffMessage has a "take everything" ctor, which happens
to match on type DiffMessage itslef, since the latter is obviously
a Lumiera Forward Operator. Unfortunately the compiler now considers
this "take everyting" ctor as copy constructor. Worse even, such a
template generated ctor qualifies as "best match".

The result was, when just returing a DiffMessage by value form a
function, this erroneous "copy" operation was invoked, thus wrapping
the existing implementation into a WrappedLumieraIterator.

The only tangible symptom of this unwanted storage bloat was the fact
that our already materialised diagnostics where seemingly "gone". Indee
they weren't gone for real, just covered up under yet another layer of
DiffMessage wrapping another Lumiera Forward Iterator
2017-08-12 18:16:06 +02:00
32f2d6ed9a IterSource: optimise hand-over at construction
by moving, we can avoid the generation of up to 3 additional shared copies
of the DataHandle. The whole invocation now works without touching any shared count
and thus without incurring a memory barrier...
2017-08-12 16:27:30 +02:00
06ff5c4e71 DiffMessage: complete test of diagnostic output 2017-08-12 14:33:26 +02:00
efc27fd07b DiffMessage: draft content diagnostics wrapper 2017-08-12 05:55:31 +02:00
d4ac2d78e2 C++11: improve moving and forwarding of iterators
this becomes more relevant now, since the actual MutationMessage iterators
are implemented in terms of a shared_ptr to IterSource. Thus, when building
processing pipelines, we most definitively want to move that smart-ptr into
the destination, since this avoids touching the shared count and thus avoids
generating unnecessary memory barriers.
2017-08-12 03:01:35 +02:00
4a2384e242 DiffMessage: add further convenience ctor for varargs
hey... all my dream constructors became true
2017-08-12 03:00:38 +02:00
380fa5bb38 DiffMessage: add further convenience ctors for STL containers 2017-08-11 22:23:51 +02:00
7dc0fdd67a DiffMessage: implement convenience ctor to build from Lumiera Iterator 2017-08-11 21:27:51 +02:00
9e4f3f3314 metaprogramming: switch util-foreach to variadic templates (#967)
...likewise low hanging fruit
2017-08-11 20:35:53 +02:00
a731b3caf4 metaprogramming: get rid of the remaining boost::enable_if usages
...low hanging fruit
2017-08-11 20:23:46 +02:00
8c1a43a6b3 metaprogramming: switch util-foreach to our own enable_if implementation
...allows us to get rid of quite some boost-includes
Incidentally, "our own" implementation is equivalent to both the
boost implementation and the implementation from C++14
It is just a bit more concise to write.
2017-08-11 20:02:37 +02:00
9ad0dd9918 DiffMessage: start with drafting the most simple test case
damn it!
why the hell is the C++ language so tedious to write....
even after years of practice you need hours to get the most basic stuff to fly
2017-08-11 18:34:23 +02:00
9d5d758f0c IterSource: use human readable source type diagnostics 2017-08-11 17:08:49 +02:00
dfd3dc1275 DiffMessage: reshape IterAdapter to allow for custom diagnostics
since we do not want to increase the footprint, we're bound to reuse
an existing VTable -- so IterAdapter itself is our only option.
Unfortunately we'll need to pass that through one additional
decoration layer, which is here the iterator; to be able to
add our string conversion there, we need to turn that into
a derived class and add a call to access the underlying
container, which gets us into element type definition mess....
2017-08-11 16:56:18 +02:00
f6baef16c5 DiffMessage: consider to unite the handling of mutation messages (#1066) 2017-08-11 15:23:33 +02:00
fdcf431a9b DiffMesage: use as payload within MutationMessage and pass Diff by RValue
now this highlights the unsettled decision still the more,
as can be seen by all that unnecessary copying. Basically we move the
Diff into the lambda-closure, from there into an anonymous instance,
from there into the embedded Buffer in MutationMessage, which again
just happens to sit in the closure storage when the action is invoked.
And all of this copying just to move the DiffMessage for consumption
into the TreeMutator...

thus by #1066 we should really get rid of the MutationMessage class altogether!
2017-08-11 02:00:54 +02:00
fd0a011ea4 DiffMessage: bold attempt towards a way to produce diffs (#1066)
actually I do not know much regarding the actual situation when,
within the Builder run, we're able to detect a change and generate
a diff description. However, as a first step, I'll pick IterSrouce
as a base interface and use a "generation context", which is to be
passed by shared-ptr
2017-08-11 00:59:10 +02:00
a7ad82c935 Library: can optimise IterStack pop()
...by moving out the element to be extracted;
because of RVO it will in fact be move constructed into
the storage of the caller
2017-08-07 00:20:55 +02:00
70e1a5b922 convert ScopedCollection to rely on C++11
- variadic templates
- type traits
- use uniqe_ptr to manage storage (instead of boost::scoped_array)
2017-08-06 18:21:25 +02:00
0b621e71c5 Library: fix a suptle misconception in the design of IterAdapter
again surprising how such fundamental bugs can hide for years...

Here the reason is that IterAdapter leaves the representation of "NIL" to
its instantiation / users; some users (here in for example the ScopedCollection)
can choose to allow for different representations of "NIL", but the comparison
provided by IterAdapter just compares the embedded pos by face value.
2017-08-06 16:58:22 +02:00
c96fcc1c6a UI-Dispatch: basic CallQueue implementation PASS 2017-08-05 17:59:55 +02:00
56def9f6d7 Library: expose some diagnostics on IterStack / IterQueue by default
seems like most usages will want to expose this kind of diagnostics for unit testing
and in fact the queue or stack nature is the primary nature of this entity,
while iterability comes as additional trait
2017-08-05 17:57:25 +02:00
3dea3c0fa0 UI-Dispatch: draft basic interface of a queue helper (#1098) 2017-08-05 17:36:32 +02:00
9b285a95c0 UI-Integration: plan the next steps to drive this topic ahead (#1099, #1098)
- concept for a first preliminary implementation of dispatch into the UI thread
 - define an integration effort to build a complete working communication chain
2017-08-05 17:36:32 +02:00
a3ed982da4 UI-top-level: fix GTK framework initialisation order 2017-05-19 17:00:41 +02:00
0c073ad6e2 fix diagnostic type formatting
...again to make it work with GCC-5,
also to allow more leeway using various compilers

Explanation: we use a helper function to abbreviate the
demangled type names to make diagnostic ouput more readable.
Obviously such a function needs to be adjusted to the
way concrete compilers generate their type output; GCC-5
slightly differs to GCC-4.9 here, so I've made the regular
expressions a bit more flexible
2017-05-02 21:01:41 +02:00
46192cadbf fix some issues with static initialisation order
...also uncovered by compiling with GCC-5
2017-05-02 21:01:41 +02:00
d29e4e2d6f GCC-5 compatibility: ambiguity in overload resolution
we have a catch-all template operator to get a string converted
or pretty printed output from "any object". Unfortunately
this overload counts equivalent to another overload by
the IO manipulators. Solution is to define both operarators
similar in the first argument, thus turing the overload
for the IO manipulators into the more specific overload
due to the explicitly given second argument
2017-05-02 00:09:48 +02:00
37cdfaba54 GCC-5 compatibility: remove the last remaining auto_ptrs 2017-05-01 21:43:10 +02:00
9262af1346 GCC-5 compatibility: remove unnecessary forward declaration
a bit over the top anyway: string will inevitably be included sooner or later
2017-05-01 18:38:52 +02:00
bb7bba5dc2 Commands: add API to unbind and discard command arguments
this seems like an obvious functionality and basically harmless,
since commands are designed to be inherently stateful, which is reflected
in all the internal storage holders to expos an assignment operator
(even while the actual implementation is based on placement new instead
of assigning values into the storage, and thus even supports immutable
values). The only possible ramification is that argument values must
be default constructible
2017-04-16 19:21:29 +02:00
410c36d2c3 Commands: change semantics of command instance management (#1089)
in accordance to the design changes concluded yesterday.
 - in the standard cases we now check the global registry first
 - automatically create anonymous clone copy from global commands
 - reorganise code internally to use common tail implementation
2017-04-16 18:27:05 +02:00
079ad715b0 Commands: change API to allow moving commands into the dispatcher queue 2017-04-16 16:16:26 +02:00
0dad15209d Commands: add new slot into SessionCommand facade
for the operation to start a new command cycle and open a new instance
2017-04-09 03:01:12 +02:00