Commit graph

14 commits

Author SHA1 Message Date
a91d03b60a Commands: draft usage of CommandInstanceManager (#1089) 2017-04-01 02:33:15 +02:00
95af930a71 Commands: finish CommandSetup helper (#1088)
this is a prerequisite for command instance management:
We have now an (almost) complete framework for writing actual
command definitions in practice, which will be registered automatically.

This could be complemented (future work) by a script in the build process
to regenerate proc/cmd.hpp based on the IDs of those automatic definitions.
2017-03-31 18:30:29 +02:00
e7d24febee Commands: add automatic registration ON_GLOBAL_INIT
...which makes the unit test PASS
2017-03-31 04:36:26 +02:00
49102ff18f Commands: define typical standard usage of CommandSetup 2017-03-31 04:14:45 +02:00
b303bcebc0 Commands: complete the test case
verify the commands where indeed defined as given by the lambda
2017-03-31 03:27:26 +02:00
de7b9f87ed Commands: ensure the commands where actually defined by the closures
...next step in the CommandSetup_test
2017-03-19 06:03:17 +01:00
09b91197d3 Commands: now able to define commands by lambda!
...just pipe all passed functor-like objects
through the reworked function signature trait
2017-03-19 04:09:25 +01:00
afadc35eab WIP: draft command binding by lambda...
as it stands, this does not work, since lambdas are passed by-value,
while function references can only be passed by explicit reference,
otherwise they'll degrade to a function pointer. And std::function
requires a plain function signature as type argument, not the type
of a function pointer (which doesn't mean you can't construct a
std::function from a FP, indeed there is an explicit overload for
that).
2017-03-18 19:02:41 +01:00
e9948084fc Commands: integrate inline command definition by lambda
...this was the problematic part of the whole design attempted here,
and seemingly it works like a charm!
2017-03-18 17:56:41 +01:00
180b1224e7 Commands: implement invocation of enqueued command definitions 2017-03-18 05:28:56 +01:00
d044abe3c7 Commands: implement the registration queue for command definitions 2017-03-18 04:40:16 +01:00
29ce5b9c69 Commands: define interface for installing a command definition
The idea is to assign a lambda, which will be enqueued by side-effect.
implementation is just stubbed.
2017-03-18 03:52:18 +01:00
833193342f Commands: define basic properties of unbound CommandSetup 2017-03-18 03:20:05 +01:00
4648703952 Commands: new test for shaping the CommandSetup helper 2017-03-18 02:27:11 +01:00