Bug 528 - Names API alignment with Config
Names API alignment with Config
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-24 20:33 UTC by Tom Henderson
Modified: 2009-03-26 20:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2009-03-24 20:33:06 UTC
Presently, the Names::Add() and Names::Rename() methods return false with a soft failure in many cases if the naming attempt did not succeed (e.g. trying to Rename an object for which there is no existing name) and return true upon success.  This is not lined up with how our Config API works (where configuration failures are hard failures, and we provide a "FailSafe" variant of some methods if needed that will return false and not assert if there is a failure).

It seems to me that we ought to align these methods with previous convention that we avoid soft configuration failures.  FailSafe variants or helpers can be added in the future as needed.

I propose to fix this now for ns-3.4 since this is not yet released API.  Specifically, the proposal would be:

Names::Add() and Names::Rename() methods return type void, and assert where they previously returned false.
Comment 1 Craig Dowell 2009-03-26 20:42:11 UTC
cc2db3e6bcae