Bugzilla – Bug 167
helper API alignment patch
Last modified: 2008-07-01 13:32:27 UTC
This proposed patch: - changes MobilityHelper::Layout to MobilityHelper::Install, and OlsrHelper::Enable to OlsrHelper::Install -- basically, trying to bring all helpers to uniformly use "Install()" as the method name for either adding interfaces or aggregating components - prints out an error in OlsrHelper::Install or InternetStackHelper::Install if the user tries to call it twice on the same node (rather than letting Object::AggregateObject() assert-- this should be more helpful error message - reverts the change I made in response to bug 162 to allow AddInternetStack() to not fail when it is called twice on the same note (enforces the policy that attempts to aggregate objects twice are programming errors)
Created attachment 126 [details] the proposed patch The proposed patch
The patch looks good. Reviewing it made me think about another the InstallAll methods you have added. Maybe we should consider using the All postfix consistently across this API. For example, CsmaHelper::EnableAscii (void) could be renamed... Do you want me to report this in another bug report ?
(In reply to comment #2) > The patch looks good. Reviewing it made me think about another the InstallAll > methods you have added. I did not add this method (was previously "EnableAll"). > Maybe we should consider using the All postfix > consistently across this API. For example, CsmaHelper::EnableAscii (void) could > be renamed... > > Do you want me to report this in another bug report ? > If you mean EnableAllAscii (), yes, that would seem to be bring more alignment with InstallAll().
> > Maybe we should consider using the All postfix > > consistently across this API. For example, CsmaHelper::EnableAscii (void) could > > be renamed... > > > > Do you want me to report this in another bug report ? > > > > If you mean EnableAllAscii (), yes, that would seem to be bring more alignment > with InstallAll(). I would say EnableAsciiAll to be consistent :)
Closed with: changeset 2995 b72805b3ca69 changeset 2996 a83b94e277d4