Proc-Commands: remove a function we likely won't need ever (closes #291)
This commit is contained in:
parent
2344d5b03f
commit
c324d2e594
5 changed files with 4 additions and 30 deletions
|
|
@ -105,6 +105,9 @@ namespace control {
|
|||
* In this case, we allow any invocation call to compile,
|
||||
* but the command will reject unsuitable signatures
|
||||
* at runtime, when fetching the operation functor.
|
||||
* @remarks actually this kind of invocation is the default case,
|
||||
* since commands are defined statically at application start-up
|
||||
* and invoked via the UI-Bus by command-ID
|
||||
*/
|
||||
struct RuntimeCheckedCommandInvoker
|
||||
{
|
||||
|
|
@ -192,17 +195,6 @@ namespace control {
|
|||
|
||||
|
||||
|
||||
template<typename SIG>
|
||||
inline
|
||||
com::CommandInvoker<SIG>
|
||||
invoke (SIG& operation_func)
|
||||
{
|
||||
Command command = Command::get ((FuncPtr)&operation_func);
|
||||
ASSERT (command);
|
||||
return com::CommandInvoker<SIG> (command);
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
com::RuntimeCheckedCommandInvoker
|
||||
invoke (Symbol cmdID)
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ namespace control {
|
|||
/** search the command index for a definition
|
||||
* @param cmdInstance using the definition to look up
|
||||
* @return the ID used to register this definition
|
||||
* or \c NULL in case of an "anonymous" command */
|
||||
* or `NULL` in case of an "anonymous" command */
|
||||
Symbol
|
||||
findDefinition (Command const& cmdInstance) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,19 +136,6 @@ namespace control {
|
|||
}
|
||||
|
||||
|
||||
/** @todo this is a "nice-to-have"; it would allow to call a function as a command,
|
||||
* almost as if it was a normal function. But this function needs to be defined
|
||||
* as a command previously, together with a suitable UNDO function. Moreover
|
||||
* this would probably require to build an additional index;
|
||||
* thus this feature is unimplemented for the time being.
|
||||
*/
|
||||
Command
|
||||
Command::get (FuncPtr)
|
||||
{
|
||||
UNIMPLEMENTED ("find a command definition which was based on the given function (ptr)");
|
||||
}
|
||||
|
||||
|
||||
/** try to access an existing command definition and immediately
|
||||
* create a new clone copy by calling #newInstance()
|
||||
* @return when search for this ID was successful, a new anonymous
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ namespace control {
|
|||
public:
|
||||
/* === command registry === */
|
||||
static Command get (Symbol cmdID);
|
||||
static Command get (FuncPtr func);
|
||||
static bool remove (Symbol cmdID);
|
||||
|
||||
/** create a clone definition */
|
||||
|
|
|
|||
|
|
@ -139,10 +139,6 @@ namespace test {
|
|||
invoke ("test.command1.2") (1234);
|
||||
CHECK ( 1234 == command1::check_);
|
||||
|
||||
// another shortcut, with static type check:
|
||||
// invoke (command1::operate) (5678); //////////////////TICKET #291 : unimplemented for now (9/09)
|
||||
// CHECK ( 1234+5678 == command1::check_);
|
||||
|
||||
com.undo();
|
||||
CHECK ( 0 == command1::check_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue