Bug 1673

Summary: Config::Set/Connect does not search for attributes in parent classes
Product: ns-3 Reporter: Alex Afanasyev <alexander.afanasyev>
Component: coreAssignee: Mathieu Lacage <mathieu.lacage>
Severity: major CC: donutcop, ns-bugs, pdbarnes, tomh, tommaso.pecorella
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
See Also: https://www.nsnam.org/bugzilla/show_bug.cgi?id=1959
Attachments: Config::DoResolve patch

Description Alex Afanasyev 2013-05-06 01:18:17 EDT
Created attachment 1590 [details]
Config::DoResolve patch

The attached patch addresses an issue with Config::Set/Connect methods.

Just an example of what is/was the issue.  Let's say I have class A with attribute 'X' and class B that is derived from class A.  Let also assume that object of class B is aggregated to a Node with id 0.

Config::Set ("/NodeList/0/$B/X", StringValue ('some-value'));

While such a code is totally legitimate, Config::DoResolve  didn't properly resolve the attribute path in parent's classes.
Comment 1 Tommaso Pecorella 2014-02-20 16:28:23 EST
This patch seems useful. Can we check its correctness with some tests and, in case, apply it ?

Either, is there a reason to not wanting this enhancement ?
Comment 2 Matthias 2014-08-01 10:37:02 EDT
sorry, i duplicated this bug 1959
Comment 3 Tom Henderson 2014-09-12 20:45:35 EDT
pushed in 10940:e51c1aaac703, thanks for the patch!
Comment 4 Tom Henderson 2014-09-12 20:46:14 EDT
*** Bug 1959 has been marked as a duplicate of this bug. ***