Commit graph

47 commits

Author SHA1 Message Date
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
afe07bdb16 decommission the safe-bool-idiom (closes #477)
obsoleted by C++11

 * in most cases, it can be replaced by an explicit conversion operator
 * especially for the Lumiera Forward Iterators, we need an implicit conversion
2017-04-02 06:42:23 +02:00
e0f866092d rectify-design(#301): disentangle CmdClosure hierarchy
Completely removed the nested hierarchy, where
the top-level implementation forwarded to yet another
sub-implementation of the same interface. Rather, this
sub-implementation (OpClosure) is now a mere implementation
detail class without VTable, and without half-baked
re-implementation of the CmdClosure interface. And the
state-switch from unbound to bound arguments is now
implemented as a plain-flat boolean flag, instead of
hiding it in the VTable.

To make this possible, without having to rewrite lots of
tests, I've created a clone of StorageHolder as a
"proof-of-concept" dummy implementation, for the sole
purpose of writing test fixtures. This one behaves
similar to the real-world thing, but cares only
for closing the command operation and omits all
the gory details of memento capturing and undo.
2016-02-07 01:41:40 +01:00
91e74b0456 clean-up(#301): separate inclusions by purpose
and remove some superfluous ones
2016-02-06 19:41:21 +01:00
37fb19ae0a refactoring: separate headers 2016-02-06 18:50:51 +01:00
2fbb7ba7c9 simplification(#301): use ctor chaining to remove clutter 2016-02-06 16:42:42 +01:00
be2179ea81 command-closure-design(#301): better naming of implementation classes
Seems this was part of the confusion when looking at
the inheritance graph: Names where almost reversed
to the meaning. the ArgumentHolder was *not* the
argument holder, but the top level closure. And
the class "Closure" was not "the" Closure, but
just the argument holder. ;-)
2016-02-06 16:29:06 +01:00
3fef76e1d7 command-binding(#990): add new GenNode based argument binding
based on the new generic tuple builder, we're now able to
add a new binding function into the command implementation
machinery, alongside the existing one. As it stands, the
latter will be used rather by unit tests, while the new
access path is what will be actually taken within
the application, when receiving argument binding
messages dispatched via the UI-Bus.
2016-01-29 00:59:34 +01:00
0e10ef09ec refactoring(#988): switch command framework to std::tuple
this was rather easy, since the stadard tuple is a drop-in replacement,
and we do nothing special here, beyond inheriting from a tuple type
2016-01-19 03:56:54 +01:00
2c20d407fc mass clean-up: adapt usage of std::cout pretty much everywhere
- remove unnecessary includes
- expunge all remaining usages of boost::format
- able to leave out the expliti string(elm) in output
- drop various operator<<, since we're now picking up
  custom string conversions automatically
- delete diagnostics headers, which are now largely superfluous
- use newer helper functions occasionally

I didn't blindly change any usage of <iostream> though;
sometimes, just using the output streams right away
seems adequate.
2016-01-07 20:12:46 +01:00
d09a5846d4 basically a working solution for toString in ostream
...and learned a lot about the new type_traits on the way.

As it seems, it is not possible to get a clean error message
when passing an "object" with no custom string conversion;
instead, some overload for an rvalue-ostream kicks in.

probably I'll go for shoing a type string in these cases
2016-01-04 22:21:09 +01:00
2704ad4512 decide upon the actual mechanics of command binding and invocation 2015-11-28 08:15:32 +01: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
7be1b7d35d Switch from TR1 preveiw to the new standard headers
- functional
- memory
- unordered collections
2014-04-03 22:42:48 +02:00
50885a065b move asside lib/format.hpp
...to make room for a new more specialised header
2011-12-27 07:44:49 +01:00
24a8d6a926 generalised diagnostic context passes unit test 2011-12-24 05:57:28 +01:00
d9f84a9bfd clean up lib/meta namespaces 2011-12-03 03:15:59 +01:00
b9d1899486 cleanup: rectify Proc-Layer namespaces (II) 2011-12-02 17:50:44 +01:00
89a9202c6c cleanup: remove precompiled headers
we don't need them and they even tend to
increase build times due to unnecessary
compound-includes at some core headers
2011-12-01 23:32:34 +01:00
3f1b7651e9 GPL header whitespace 2010-12-17 23:28:49 +01:00
e32044e453 refactor CmdClosure to accept a cloneBuilder visitor 2009-10-11 05:57:45 +02:00
07de2a767b implement equality comparison on CommandImpl level 2009-10-11 05:57:44 +02:00
abd23ae399 TypedAllocationManager (frontend) now in lib:: -- unit test pass 2009-10-11 05:57:43 +02:00
09b9f64842 diagnostics about captured state (on the CmdClosure API) 2009-09-21 03:33:56 +02:00
246c535569 Rewrite CmdClosure to actually invoke rather then to create a tr1::bind term
basically this should close Ticket #205  (some details missing)
2009-09-21 03:15:06 +02:00
fd7337f801 WIP drastically simplify command-mutation.
As we're using now a command frontend interface and
and CommandImpl frame in the Registry, most of the
functionaliry on Mutation's interface is superfluous.
Additionally, this separates Mutation and Closure.
2009-09-20 18:37:20 +02:00
b9763b6c16 command frontend sort-of written now, pending integration test 2009-08-10 01:32:33 +02:00
eada1aa745 now able to solve the store-as (clone) problem 2009-08-09 04:12:46 +02:00
a677e2edde second shot for implementing the binding: better the other way round 2009-08-04 02:25:50 +02:00
b6246cbb10 rename the operation "closeArguments", which is more to the point 2009-08-04 02:24:47 +02:00
4236d0649a WIP: implement the basic operation of execution pattern 2009-08-02 18:00:03 +02:00
c85d1d3cd8 ArgumentHolder finished, low-level integration test pass 2009-07-20 07:03:18 +02:00
e879e0c81b implemented argument and memento comparisons (doesn't pass test yet) 2009-07-19 19:13:25 +02:00
6510155e76 back on route: trying to get the ArgumentHolder to fly... 2009-07-18 19:36:32 +02:00
accaba4904 WIP impl draft for ArgumentHolder 2009-07-12 18:55:33 +02:00
9aa5ba560c finish and tidy up control::Mutation, unit test pass 2009-07-10 19:04:01 +02:00
d13d461a9c revamp namespace func. Finish excursion on function handling 2009-07-03 14:31:52 +02:00
5ab8c126e0 WIP compilation fixes and stubs; split off MementoClosure (incl. separate unit test) 2009-06-24 06:38:33 +02:00
2aee99f2f3 WIP working out the details of Mutation and UndoMutation 2009-06-23 05:54:54 +02:00
909c7a1715 now core operation of CmdClosure passes compler! 2009-06-22 06:18:13 +02:00
c3768b93a1 function closure utils finished and pass test 2009-06-21 08:38:24 +02:00
294c254f29 Fix instantiation of Tuple datastructs 2009-06-20 23:17:22 +02:00
0117e4bce5 start a function-closure unit test... 2009-06-20 18:41:18 +02:00
b26de14dcf WIP how to apply the param tuple? 2009-06-20 09:22:33 +02:00
bc94f299e2 hey... now storing the operation is almost effortless! 2009-06-20 07:13:20 +02:00
f358f548d1 draft version of CmdClosure and Mutation interface now passing compiler 2009-06-19 19:11:33 +02:00
ba37045b48 WIP: interface/framwork skeleton 2009-06-08 04:50:29 +02:00