[Rock-dev] Small change in orogen master with some consequences for people that use subclassing

Sylvain Joyeux sylvain.joyeux at dfki.de
Thu May 19 10:12:38 CEST 2011


I've started to forward a constructor from RTT::TaskContext through the 
orogen-generated class hierarchy

What it means is that the *Base classes generated by orogen now have a 
constructor with the signature

    ControllerBase(std::string const& name,
         RTT::ExecutionEngine* engine,
         TaskCore::TaskState initial_state = Stopped);

for the tasks that don't have needs_configuration, and for the others,

    ControllerBase(std::string const& name,
         RTT::ExecutionEngine* engine);

This has effect for those of you that were using subclassing in orogen. 
For those, you need to add the same constructor to the "user" part of 
the tasks as well, i.e.

    Controller(std::string const& name,
         RTT::ExecutionEngine* engine,
         TaskCore::TaskState initial_state = Stopped)
	: ControllerBase(name, engine, initial_state) {}

As always, you can take the method signature and implementation from

   templates/task/YourTask.cpp
   templates/task/YourTask.hpp

Just beware: you of course need to do initialization in the new 
constructor the same way than in the other constructor !

If you don't use subclassing, you'll be fine (i.e. it will compile). 
People that start to subclass your task will have the problem and will 
need to add the constructor to it though ...


-- 
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------


More information about the Rock-dev mailing list