|
Bugzilla – Full Text Bug Listing |
| Summary: | ObjectFactory >> operator for recursive string description | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | SEANY CAROLINY OLIVEIRA SILVA <seany> |
| Component: | core | Assignee: | Peter Barnes <pdbarnes> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://www.nsnam.org/bugzilla/show_bug.cgi?id=2586 | ||
| Attachments: |
fix
TestCase |
||
Created attachment 3184 [details]
TestCase
|
Created attachment 3183 [details] fix Hi, We found a bug at the ObjectFactory class >> operator when parsing strings used when specifying attributes. When one class has a attribute describing another class (pointers or object factories), we may face a error. At first, we had to change the way the code looks for the closing bracket “]”. When we have a recursive class description, we must look for the last “]” in the string. Then, when looking for the “|” character as the delimiter between different pairs of attribute name and values, we can’t just look for the next “|”, as this may belong to separate attributes of the inner class. So we use the concept of level when parsing the string, increasing the level when entering a recursive description. So we can now look for the next “|” in level 0. You can find attached a patch which fix the error and a simulation scenario for tests.