method with arguments

<[email protected]> Tue, 12 Sep 2006 16:51:42 +0200
Newsgroups gmane.science.robotics.orocos.user
Message-ID <[email protected]>
Hi,

I'm trying to create a method with (multiple) arguments, and I keep getting compile errors.

I changed the code from HelloWorld to keep it simple:

Method declaration:
>From       Method<std::string(void)> method;
To         Method<std::string(double)> method;

Method itself:
>From    std::string mymethod() { ..code with return.. }
To      std::string mymethod(double x) { ..code with x and return.. }

The other lines remain the same.
Or should the interface setup line be changed aswell?

And I get compile errors like so:

/usr/local/orocos/include/rtt/MethodRepository.hpp: In member function &#8216;bool
RTT::MethodRepository::addMethod(MethodT, const char*) [with MethodT = RTT::Method<std::string
()(double)>*]&#8217;:
/home/beki/src/orocos-components/vha/vha.hpp:176:   instantiated from here
/usr/local/orocos/include/rtt/MethodRepository.hpp:119: error: invalid application of &#8216;
sizeof&#8217; to incomplete type &#8216;boost::STATIC_ASSERTION_FAILURE<false>&#8217;


What am I doing wrong?

Kind regards
Steven Vanderbeke

_______________________________________________
Orocos mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos