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
: ns-3
documentation
: ns-3-dev
: All All
: P5 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-04-29 15:26 EDT by
Modified: 2009-05-19 09:36 EDT (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-04-29 15:26:45 EDT
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 From 2009-04-29 15:58:20 EDT -------
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 From 2009-04-30 03:51:51 EDT -------
+1
------- Comment #3 From 2009-05-19 09:36:55 EDT -------
changeset: c11b6d768ab3