Bug 1673 - Config::Set/Connect does not search for attributes in parent classes
Config::Set/Connect does not search for attributes in parent classes
Product: ns-3
Classification: Unclassified
Component: core
All All
: P5 major
Assigned To: Mathieu Lacage
: 1959 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2013-05-06 01:18 EDT by Alex Afanasyev
Modified: 2014-09-12 20:46 EDT (History)
5 users (show)

See Also:

Config::DoResolve patch (5.01 KB, application/octet-stream)
2013-05-06 01:18 EDT, Alex Afanasyev

Note You need to log in before you can comment on or make changes to this bug.
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. ***