Commit graph

53 commits

Author SHA1 Message Date
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
b58427e49f Command-Framework: mark anonymous commands
It turns out we *do* support the use of anonymous commands
(while it is not clear yet if we really need this feature).

Basically, client code may either create and register a new
instance from another command used as prototype, by invoking
Command::storeDef(ID). Or, alternatively it may just invoke
newInstance() on the command, which creates a new handle
and a valid new implementation (managed by the handle as
smart-ptr), but never stores this implementation into the
CommandRegistry. In that case, client code may use such a
command just fine, as long as it cares to hold onto that
handle; but it is not possible to retrieve this command
instance later by symbolic ID.

In the light of this (possible) usage pattern, it doesn't
make sense to throw when accessing a command-ID. Rather, we
now return a placeholder-Symbol ("_anonymous_")
2016-12-25 21:46:58 +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
1dc9642ec4 draft implementation of diagnostic command handler 2016-01-22 19:44:17 +01:00
005e665c13 clean-up design of the command handling patterns (#210)
this was a classical example of a muddled and messed-up design,
driven just by the fact that I wanted to "spare" some functions,
with the net effect of writing more functions, plus a proxy class
plus create a lot of confusion for the reader.

This was easy to resolve though, once I resorted to the
general adivice to make public interface methods final,
make the extension ponts protected and never
to chain two extension points
2016-01-22 15:25:08 +01:00
b96fd1299d preparation(#985): purge any remaining direct uses of boost::format
now we use boost::format through our own front-end util::_Fmt
solely, which both helps to reduce compilation time and code size,
and gives us a direct string conversion, which automatically
uses any custom operator string() available on arguments.

While desirable as such, I did this conversion now, since
it allows us to get rid of boost::str, which in turn helps
to drill down any remaning uses of our own util::str
2016-01-04 01:38:04 +01:00
2704ad4512 decide upon the actual mechanics of command binding and invocation 2015-11-28 08:15:32 +01:00
0ea37402d2 Ticket #934: switch entire code-base to use the new Singleton factory
lib::Depend<TY>  works as drop-in replacement for lib::Singleton<TY>

This changeset removes the convoluted special cases like
SingletonSub and MockInjector.
2013-10-20 03:19:36 +02:00
b9d1899486 cleanup: rectify Proc-Layer namespaces (II) 2011-12-02 17:50:44 +01:00
3f1b7651e9 GPL header whitespace 2010-12-17 23:28:49 +01:00
5c28b5d46e re-read, verify and finish off the Scope, ScopeLocator and QueryFocus implementation 2010-10-16 02:21:19 +02:00
330eb2c243 extended for-each looping helpers. Closes #479 2010-01-04 14:48:00 +01:00
c6d5f8a0b4 Proc Command framework: *first integraton round finished* 2009-10-11 05:57:46 +02:00
ae01f85452 replace existing implementation with CommandImplCloneBuilder 2009-10-11 05:57:45 +02:00
0bcbf7fee0 fix further problems uncovered by test; allow for anonymous cloning 2009-10-11 05:57:45 +02:00
17c7160f02 refactor CommandDef, get rid of the possibility of re-defining. YAGNI! 2009-10-11 05:57:45 +02:00
37cd451367 fix sloppy definition of less-than comparison, which caused malfunction of registry 2009-10-11 05:57:45 +02:00
d2acf48587 change semantics of state predicates, as it seems less surprising this way 2009-10-11 05:57:44 +02:00
95db5f9840 clarify state predicates in conjunction with command lifecycle 2009-10-11 05:57:44 +02:00
07de2a767b implement equality comparison on CommandImpl level 2009-10-11 05:57:44 +02:00
4c3fc9e64d WIP getting CommandRegistry_test to run
(equality on CommandImpl is still missing)
2009-10-11 05:57:43 +02:00
8c21f21acc namespace cleanup: bring Singleton and Factory into lib:: 2009-10-11 05:57:41 +02:00
7fccecacce WIP using the reverse index to find out the Command-ID
this includes using a Command* as key within a std::map
2009-10-11 05:57:39 +02:00
4c9af94e1d improve and clean up the Command interface 2009-10-11 05:57:39 +02:00
8dc434a141 CommandRegistry implementation (...) 2009-10-11 05:57:39 +02:00
925fa685b1 WIP change HandlingPattern to work on CommandImpl rather 2009-09-21 03:11:46 +02:00
b9763b6c16 command frontend sort-of written now, pending integration test 2009-08-10 01:32:33 +02:00
5988b1d697 clean up command interface 2009-08-10 01:30:59 +02:00
9f40e4af9c implemented definition and access of handling patterns 2009-08-09 21:55:47 +02:00
da3cf5a6a6 rework the cmd registry to build on this 2009-08-09 03:48:19 +02:00
e178bd0811 completely factor out allocation/deallocation and placement new into a base class 2009-08-09 03:47:32 +02:00
09a594d2c5 WIP: considerations for a store-as (clone) operation 2009-08-06 18:00:19 +02:00
a677e2edde second shot for implementing the binding: better the other way round 2009-08-04 02:25:50 +02:00
155254dd9b build new cmd impl object within registry 2009-08-03 18:17:41 +02:00
853aff1228 fixed and stubbed until it passes compiler again 2009-08-02 20:57:04 +02:00
4236d0649a WIP: implement the basic operation of execution pattern 2009-08-02 18:00:03 +02:00
f2126c0764 WIP partially get new proc-layer command impl through the compiler 2009-08-01 23:57:12 +02:00
8971d667cf WIP more implementation... 2009-08-01 17:14:27 +02:00
c2d9a02303 WIP some more nailing down of implementation details 2009-08-01 02:18:01 +02:00
c9e143995e WIP phase out the superfluous static access functions 2009-07-30 20:50:57 +02:00
655177921f WIP this might solve the race condition 2009-07-30 03:57:19 +02:00
eaa4adddde WIP more implementation drafting... 2009-07-29 16:55:15 +02:00
19dd606f54 WIP some implementation drafting... 2009-07-27 02:38:53 +02:00
3ebb8d0285 WIP and more stubbing... 2009-07-26 02:00:47 +02:00
1db718c2b3 WIP more stubbing... 2009-07-25 19:21:50 +02:00
211a2dabdd WIP stubbing undefined operations... 2009-07-24 17:50:14 +02:00
d80f0cfb8d WIP start some drafting 2009-07-21 04:49:00 +02:00
accaba4904 WIP impl draft for ArgumentHolder 2009-07-12 18:55:33 +02:00
51712f218d still fighting to get capture fun and undo func bound together 2009-06-28 15:27:27 +02:00