[Ns-developers] ns-3.4 proposal: Object Name Service
Raj Bhattacharjea
raj.b at gatech.edu
Thu Jan 22 12:01:16 PST 2009
On Thu, Jan 22, 2009 at 6:37 AM, Gustavo Carneiro <gjcarneiro at gmail.com> wrote:
>> > Object::AssignName(std::string); this makes things less verbose and
>> > leads to changes like:
>> >
>> > - Names::Add ("/Names/client", n.Get (0));
>> > - Names::Add ("/Names/server", n.Get (1));
>> > + n.Get (0)->AssignName("/Names/client");
>> > + n.Get (1)->AssignName("/Names/server");
>>
>> I'm not really sure this buys much and it adds another API "somewhere
>> completely different." I'm willing to consider if there's a
>> demand for such things ...
>
> +0.5 for avoiding API duplication.
Its not really API duplication; it is a "wrapper" or "syntactic
sugar". It is no different than, e.g. EventId::Cancel (), which is
another way to write Simulator::Cancel(EventId).
What I think It buys users is the simple conceptual model in their
heads that they are assigning names to Object, instead of registering
a name<->Object mapping in a namespace.
--
Raj Bhattacharjea
Georgia Institute of Technology
School of Electrical and Computer Engineering
Ph.D. Candidate
Systems Analyst
404.894.2955
More information about the Ns-developers
mailing list