Re-added compose/decompose API on master branch

I have re-added the compose/decompose API to the Typekit classes, keeping it
100% compatible with RTT 1.x. Concretely, this means that you implement
composeTypeImpl() and decomposeTypeImpl() by just copy-pasting these functions
from your RTT 1.x toolkit. The semantics have broadend slightly to also allow
non-propertybag conversions, but in that case, you need to override
composeType()/decomposeType() (rare use case). You can use this method for
TemplateTypeInfo, StructTypeInfo, SequenceTypeInfo etc.

I have updated the docs (rtt/doc/xml/orocos-typekit-plugin.xml) to explain
when you need to implement these functions and when not.

For (automated) testing purposes, you can just check that:

typeinfo->composeType( typeinfo->decomposeType( input ), output)
assert( input->get() == output->get() )

where input and output are data sources of same type as 'typeinfo'. Since the
RTT itself does not have such a type, we need some testing/feedback from real
typekits.

This change is supposed to be backwards compatible with 2.0/2.1 typekits as
well (so you're not forced to upgrade to these functions in case you found
another way by now).

I apologize for the pain every 2.x typekit writer has suffered because of the
removal of these two functions. I hope future migrations will be less painful.

Peter

Re-added compose/decompose

Thank you Peter for this patch.

I have just tested it with my typekit, and it seems to work.

I have tried the test you suggest, i have put traces in my methods, and everything seems ok.

Thank you again !

Paul.

Re-added compose/decompose

On Tuesday 09 November 2010 18:03:18 paul [dot] chavent [..] ... wrote:
> Thank you Peter for this patch.
>
> I have just tested it with my typekit, and it seems to work.
>
> I have tried the test you suggest, i have put traces in my methods, and
> everything seems ok.

Thanks for this very quick (positive) feedback. Could you also test the
methods of the marshalling service ? They are very dependent on correct
behaviour of the PropertyBag functions, which have changed from 1.x to 2.x.

We need to extend the RTT unit tests to include testing custom
compose/decompose functions.

Peter