Compose a type (target) from a DataSourceBase (source) containing its members. The default behavior tries to assign source to target. If that fails, it tries to decompose target into its members and update the members of target with the contents of source.
The default implementation in TemplateTypeInfo works for most types, but can be overridden in case there are multiple versions/possibilities to make a target from a source. For example, in order to support legacy formats or in order to do the inverse of decomposeType().
|source||A data source of the same type as target OR a PropertyBag that contains the parts of target to be refreshed. |
|target||A data source of the same type as this TypeInfo object which contains the data to be updated from source. |
- true if source could be updated, false otherwise.
- See also
- types::propertyDecomposition and types::typeDecomposition for the inverse function, decomposing a type into datasources and hierarchical properties.
decomposeType to do the inverse operation.
Reimplemented in RTT::types::EnumTypeInfo< T >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >, RTT::types::StdStringTypeInfo, RTT::types::RTStringTypeInfo, RTT::types::StdTypeInfo< T >, RTT::types::StdTypeInfo< bool >, RTT::types::StdVectorTemplateTypeInfo< T, has_ostream >, and RTT::types::StdVectorTypeInfo.
Definition at line 59 of file TemplateCompositionFactory.hpp.