Bug 560 - NS_DEPRECATED methods give no hints about how to change API
NS_DEPRECATED methods give no hints about how to change API
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: documentation
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-29 15:26 UTC by Rajib Bhattacharjea
Modified: 2009-05-19 09:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajib Bhattacharjea 2009-04-29 15:26:45 UTC
On gcc, our -Werror option during compile causes compilation to fail if you use any deprecated methods.  Reading the header files with the offending APIs gives no hint about how to change your model/script, while inspecting the code of the deprecated methods gives you the clue you need.  These need to be documented as deprecated, along with the part that should also be in CHANGES.html that tells you how to fix your code to use the new API.

List of the deprecated methods in src/ of ns-3-dev as of today:

simulator/simulator.h:
  static void EnableLogTo(char const *)
helper/point-to-point-helper.h: 
  void SetDeviceParameter(std::string,const AttributeValue &)
  void SetChannelParameter(std::string,const AttributeValue &)
helper/csma-helper.h:
  void SetDeviceParameter(std::string,const AttributeValue &)
  void SetChannelParameter(std::string,const AttributeValue &)
common/packet.h:
  static void EnableMetadata (void)
Comment 1 Craig Dowell 2009-04-29 15:58:20 UTC
I believe these methods should all be removed since they have been hanging around for several releases, now.

The original idea (IIRC) was to mark them deprecated for one release cycle and then remove them.  The documentation should be in the changes for the release in which they were marked as deprecated, and the fact that they were removed noted in the next release.


Comment 2 Mathieu Lacage 2009-04-30 03:51:51 UTC
+1
Comment 3 Mathieu Lacage 2009-05-19 09:36:55 UTC
changeset: c11b6d768ab3