Closed meyerj closed 8 years ago
LGTM modulo a small testcase that exercises the two new PropertyBase
interface additions.
Thanks for putting this together :)
LGTM modulo a small testcase that exercises the two new PropertyBase interface additions.
Done: https://github.com/orocos-toolchain/rtt/pull/158/commits/45c7a64f512eea96f44a1efaca21ec090af79f64
lgtm, I created a separate issue to track the unrelated failing test #164
These new methods can be used to "link" a property to another without having to know the exact derived type, e.g.:
It should be noted that the assignment
*b = a
in the above example is equivalent tob = a->copy()
becausePropertyBase::copy()
introduced in 44b9970e9685b9b812ddce1e8cc8c9b400553d54 also has linking semantics (shared data source). This is in fact inconsistent with thePropertyBase::copy(const PropertyBase *)
orDataSourceBase::copy()
methods which have deep-copy semantics -- so probably a candidate for removal in 2.9? The only usage ofPropertyBase::copy()
within RTT itself is PropertyBag assignment, which is supposed to have linking semantics, too, and which has a slightly different behavior for owned vs. non-owned properties.The
RTT::Property<T>::Property(base::PropertyBase *)
constructor and assignment operator have been updated to call the new method for consistency reasons. The patch is not ABI compatible. That's why I would like to integrate it before an official 2.9 release.We would need this feature to build an application-wide, consolidated property tree which also allows for dynamic updates (with manual coordination).