Hi,
We have a few Commands we like to connect a default condition to that
returns true:
Command
The connect in ClassA:
Dummy = command( Dummy.getName(), &ClassA::CommandFunction,
&DummyCommand::DefaultBoolTrue, this );
With:
CommandFunction being of type bool(int)
DefaultBoolTrue being of type bool(void)
This is the general idea. I also tried with
Command(std::string name, CommandF com, ConditionF con,
CommandProcessor* commandp, bool invert = false)
And binding the functions myself using quickbind:
RTT::Command
RTT::Command
RTT::detail::quickbind
boost::bind(&VDWCommand::DefaultDone, this),
Tc->engine()->commands()
));
Ofcourse this does not work...
Any ideas?
HOWTO Connect a 'default' condition function to a Command.
On Friday 23 November 2007 08:46:51 Vandenbroucke Sander wrote: Dummy("Dummy");
> Hi,
>
> We have a few Commands we like to connect a default condition to that
> returns true:
>
> Command
>
> The connect in ClassA:
>
> Dummy = command( Dummy.getName(), &ClassA::CommandFunction,
> &DummyCommand::DefaultBoolTrue, this );
The problem is that CommandFunction and DefaultBoolTrue must be functions of
the same class (ClassA). What you can do is to add to ClassA the
DefaultBoolTrue(void) function. This will work then.
I've been thinking to make completion conditions optional for the user, but
never arrived at the implementation...
Peter