[Ns-developers] Ipv4Address and Ipv4Mask, getting rid of "implicit" constructors
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed May 14 08:11:47 PDT 2008
On Tue, 2008-05-13 at 22:55 -0700, Tom Henderson wrote:
> Do you mean even the helper APIs?
I would think so.
>
> Currently, the examples read, e.g.
>
> Ipv4AddressHelper ipAddrs;
> ipAddrs.SetBase ("192.168.0.0", "255.255.255.0");
>
> are you suggesting:
>
> Ipv4AddressHelper ipAddrs;
> ipAddrs.SetBase (Ipv4Address ("192.168.0.0"), Ipv4Mask
> ("255.255.255.0"));
>
> if so, could we support the string-based API explicitly via overloaded
> helper functions and avoid the extra typing here? It just seems
Yes, you could and it would be much safer than the version which relies
on implicit conversions. The extra verbosity in the above example does
not bother me very much though.
Mathieu
More information about the Ns-developers
mailing list