|
Bugzilla – Full Text Bug Listing |
| Summary: | Replace "std::string context" parameter with a more useful Config::Path parameter | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | core | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
|
Description
Gustavo J. A. M. Carneiro
2008-03-20 13:54:23 UTC
Created attachment 117 [details]
patch
I discussed this at length with gustavo on irc: while I do understand why he wants to do this, I would personally go another route: 1) keep the current std::string context string in callback signatures 2) provide a Config::Path class which can be constructed from a string (cannot be converted back to a string) and which performs the string parsing for you to allow you to call simple methods such as GetElementAsString (1) or GetElementAsUint32 (2) Basically, I would take gustavo's proposed code but I would not use it as the default context in callback signatures. So, to summarize, I think that gustavo's code is useful. The only question is how we want to integrate it and although I disagree with gustavo on how it should be integrated, I don't think it is that important so, if anyone agrees with gustavo, feel free to apply the patch as-is. This issue does not seem to have gotten traction. If other developers are not interested in the patch, it is better to discard it forever than break the API later. It needs to go in right now or not at all. I am guessing not at all :-/ |