Bug 528

Summary: Names API alignment with Config
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

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