[Bug 512] New: [Project] Allow to load extra properties from file in a TaskContext

For more infomation about this bug, visit
Summary: [Project] Allow to load extra properties from file in a
Product: RTT
Version: 1.4.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Properties & XML
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
Estimated Hours: 0.0

Created an attachment (id=235)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=235)
Adds loadProperties() mechanism without memory management

Sometimes it is handy to load extra properties into a component, after it has
been compiled, for example to feed an Orocos script extra parameters from an
XML file. Or your C++ code could check if such a property has been loaded by
the user.

Now we can only update existing properties from a file.

The only technical hurdle for such a new system is that there yet is no means
to clean up the added properties, as the RTT does not track ownership of
properties (it assumes the creator of the property will also clean it up). In
other words, this memleaks if you do a "create component - load extra
properties - destroy component" cycle. If we only used smart pointers !

As collections of properties are stored in a PropertyBag, it seems the logical
place to store ownership information inthere as well. I don't have a clear view
yet on how complex this will make things, but I guess an extra
'std::vector owned_props' store in the PropertyBag will be
required and sufficient.

This would be RTT 1.6 due to API additions.

[Bug 512] [Project] Allow to load extra properties from file in

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
AssignedTo|orocos- |peter [dot] soetens [..] ...
|dev [..] ... |
Attachment #235 is|0 |1
obsolete| |

--- Comment #1 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-02-27 22:37:54 ---
Created an attachment (id=245)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=245)
Adds property bag memory management as well.

I've extended the PropertyBag with a ownProperty( PropertyBase* ) method and
ownsProperty( PropertyBase* ) query. One can now insert properties in a
property bag which are owned by the property bag.