Commit graph

22 commits

Author SHA1 Message Date
bf283e8843 QA: check for possible misalignment through placement new (-> #1204) 2019-11-08 01:14:36 +01:00
f6e5886348 Library: complete test coverage of VerbPack 2019-06-11 02:40:20 +02:00
3d5a67ed14 Library: finish and clean-up the solution for VerbPack dispatch 2019-06-10 16:08:50 +02:00
8f43c2591e Library: investigate malfunction in metaprogramming
the template lib::PolymorphicValue seemingly picked the wrong
implementation strategy for "virtual copy support": In fact it is possible
to use the optimal strategy here, since our interface inherits from CloneSupport,
yet the metaprogramming logic picked the mix-in-adapter (which requires one additional "slot"
of storage plus a dynamic_cast at runtime).

The reason for this malfunction was the fact that we used META_DETECT_FUNCTION
to detect the presence of a clone-support-function. This is not correct, since
it can only detect a function in the *same* class, not an inherited function.

Thus, switching to META_DETECT_FUNCTION_NAME solves this problem
Well, this solution has some downsides, but since I intend to rewrite the
whole virtual copy support (#1197) anyway, I'll deem this acceptable for now


TODO / WIP: still some diagnostics code to clean up, plus a better solution for the EmptyBase
2019-05-10 02:19:01 +02:00
e28635a11a Library: investigate copy behaviour in forwarding calls 2019-04-21 03:52:34 +02:00
500af8aa34 Library: allow for subclassing PolymorphicValue
Up to now, PolymorphicValue was always used as-is, packaged into a typedef.
Now we consider using it as building block within an adapter for visitor-like tokens.

Which requires to pass-down the ctor call directly from the subclass, at least if we
want to emplace the resulting entity directly into a stdlib container.

As an asside, PolymorphicValue also used explicit specialisations for N-arguments,
which meanwhile can be replaced by variadic templates
2019-04-16 18:15:24 +02:00
ec9b2388da Timeline: consider how to integrate the drawing code
...which leads to a specific twist here; while in the simple version
we still could hope to get away with a simple uniform uint argument,
the situation has changed altogether now. The canvas has turned into
some generic component, since it is instantiated two times, onece for
the time ruler and once for the actual body content. Thus all of the
specifics of the drawing code need to be pushed into a new, dedicated
renderer component. And this more or less forces us to pass all the
actual presentation variations through the invocation arguments of
the visitor.

So we're now off again for a digression, we need a more generalised visitor
2019-04-14 15:38:57 +02:00
a731b3caf4 metaprogramming: get rid of the remaining boost::enable_if usages
...low hanging fruit
2017-08-11 20:23:46 +02:00
fa7fbb3554 remove top-level default include 2017-02-11 23:40:26 +01:00
4a2340ca5e solution for access to "tree mutator building closure"
- default recommendation is to implement DiffMutable interface
- ability to pick up similar non-virtual method on target
- for anything else client shall provide free function mutatorBinding(subject)


PERSONAL NOTE: this is the first commit after an extended leave,
where I was in hospital to get an abdominal cancer removed.
Right now it looks like surgery was successful.
2016-07-21 19:29:16 +02:00
08e7e3df15 prefer more readable bool operator spelling
especially the '!' for negation is sometimes too terse
and easily overlooked.
2015-09-25 03:12:04 +02:00
f5ddfa0dbe decide on the foundations of tree diff representation
- we use a GenNode element
- this holds a polymorphic value known as DataCap
- besides simple attribute values, this may hold collections of GenNode sub elements
- a special kind of GenNode collection, the Record, is used to represent objects

The purpose of this setup is to enable an external model representation
which is only loosely coupled to the interndal data representation
through the exchange of (tree)diff messages
2015-03-21 02:00:55 +01:00
baefd74ae7 prepare refactoring of the Query interface 2012-11-25 02:04:19 +01:00
06c7c27252 merge diagnostic facilities 2011-12-31 06:49:31 +01:00
dbb63ffc08 perfer STATIC_ASSERT to check for suitable placement-New buffer size
Still incomplete, but already this small change
detected an error in the output-designation. Cough.
2011-12-28 06:42:18 +01:00
8362145039 spelling and comments 2011-12-10 03:13:45 +01:00
d9f84a9bfd clean up lib/meta namespaces 2011-12-03 03:15:59 +01:00
d1b6f7a57b polymorphic value builder functions: how to take arguments
Previously, I've added an additional '&' to be able
to pass references without much ado. This turned out
to be problematic when using constant values at the
invocation site. Well. C++ has really a fixation
ont passing things by value. This is fine, but
doesn't play so well at times when passing smart-ptrs
or similar ref-counting stuff, especially when we just
want to *use* the handle, not store it away.
Essentially the same situation as with for_each

Bottom line: from now on, we need to state the
template parameter for such arguments explicitly,
or just accept the overhead of creating an additional
transient copy of the smart-ptr.
2011-09-25 19:26:03 +02:00
6fa11ffcf6 special case: support cloning, but not copy
needed to add yet another policy template,
so PolymorphicValue doesn't invoke the
assignment operator in such cases
2011-05-15 04:19:25 +02:00
6daf14211b Finish the PolymorphicValue support template 2011-05-15 04:19:25 +02:00
710ae8fa0f Allow for improved performance in special cases
Using a policy based switch in case the client
interface collaborates and provides copy operations;
in this case, a direct static downcast instead of
the expensive indirect (dynamic) cast to the
management interface can be employed.
2011-05-15 04:19:25 +02:00
9aa601d004 WIP first implementation version of PolymorphicValue holder template 2011-05-15 04:19:25 +02:00