-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
property: remove copy() method and allow to construct or create a pro…
…perty with a custom data source PropertyBag assignment is supposed to have linking semantics (changing the value of a property in the copy also changes the value in the original bag), which is important for property composition and decomposition. The PropertyBase::copy() method introduced in 44b9970 had this linking semantics and was used for PropertyBag assignment, but the term `copy` was actually always associated with deep-copy semantics in RTT, like in PropertyBase::copy(const PropertyBase *) or in DataSourceBase::copy(). This patch introduces an alternative signature for the create() method, which accepts a custom data source instead of creating a default-initialized ValueDataSource. PropertyBag assignment now calls this create() method with the DataSource pointer of the original property to be copied. This reverts commit 44b9970. Signed-off-by: Johannes Meyer <[email protected]>
- Loading branch information
Showing
3 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters