Closed wdeconinck closed 12 years ago
Fixed in a private branch, to be merged soon.
Just reorganized things a little bit, making it easier to add more "base" types to check against (by extending an MPL vector) and avoiding const casts. The test was also updated to avoid regressions.
Configuration of a OptionComponent of a const type An option created by e.g.
options().add_option("mesh", Handle<Mesh const>() );
should be possible to configure with:options().configure_option("mesh", component.handle<Component>() );
as well as with:options().configure_option("mesh", component.handle<Mesh>() );
This will solve a bug encountered trying to configure this option from a python script:
+++ Exception thrown on rank 0 ++++++++++++++++++++++++++++++++++++++++++++++ From : '/Users/willem/workspace/coolfluid3/dev/kernel/cf3/common/OptionComponent.hpp:70:change_value' Type : 'BadValue' Message : Bad value of type
cf3::Handle<cf3::common::Component>
passed where handle of type Mesh was expected for option mesh +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++