Commit graph

7 commits

Author SHA1 Message Date
5c0baba2eb finish implementation of GenNode - TreeMutator binding
some minor code clean-up and comments;
the solution dafted yesterday is the way to go.
2016-09-04 20:55:21 +02:00
17f8922775 solution (draft) for the type field problem
unit test PASS

but the resulting code is hard to understand
should refactor it to use a binding class
similar to the other binding cases
2016-09-03 22:34:36 +02:00
05768e4ac5 first part of unit-test for GenNode TreeMutator-binding PASS
needed to use a forward function declaration within the
lambda for recursive scope mutator building, since otherwise
everything is inline and thus the compilation fails when it
comes to deducing the auto return type of the builder.

Other than that, the whole mechanics seem to work out of the box!
2016-09-02 03:10:27 +02:00
e00d6c2a4c reorganise inclusion of TreeMutator-DSL builders
previously they where included in the middle of tree-mutator.hpp
This was straight forward, since the builder relies on the classes
defined in the detail headers.

However, the GenNode-binding needs to use a specifically configured
collection binding, and this in turn requires writing a recursive
lambda to deal with nested scopes. This gets us into trouble with
circular definition dependencies.

As a workaround we now only *declare* the DSL builder functions
in the tree-mutator-builder object, and additionally use auto on
all return types. This allows us to spell out the complete builder
definition, without mentioning any of the implementation classes.
Obviously, the detail headers have then to be included *after*
the builder definition, at bottom of tree-mutator.hpp
This also allows us to turn these implementation headers into
completely normal headers, with namespaces and transitive #includes

In the end, the whole setup looks much more "innocent" now.

But beware: the #include of the implementation headers at bottom
of tree-mutator.hpp needs to be given in reverse dependency order,
due to the circular inclusion (back to tree-mutator.hpp) in
conjunction with the inclusion guards!
2016-09-02 01:29:32 +02:00
f907ff05d6 WIP: define binding behaviour for diff->GenNode
...need still to solve a problem with circular definition dependencies
2016-09-01 22:58:08 +02:00
c791763890 implement builder setup for Rec<GenNode>
this compiles just fine.
But we still need to define the concrete closures
to make it work with the actual contents of GenNode
2016-08-31 18:40:09 +02:00
a01435f367 WIP: outline of a new GenNode binding
...instead of using a hand written implementation,
the idea is to rely on the now implemented building blocks,
with just some custom closures to make it work.
2016-08-31 17:09:32 +02:00