[Ns-developers] Bug 215 Name Container
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Mon Dec 1 19:16:58 PST 2008
> > but in C and assembler you would probably see
> >
> > copy (destination, source) or
> > assign (identifier, value)
>
> Precisely. I was more thinking of simple variable assignment:
>
> foo = 3;
>
> > That is exactly what I did in this case.
>
> That is precisely what you did _not_ do in this case :-)
That's odd. I know it's been a long time, but I do seem to recall that
really is what I did :-)
[ ... ]
> >From your example:
>
> NameList::Add (devices.Get (3), "Node 3/eth0");
>
> What do you call identifier, and what do you call value, in this case?
Isn't this perfectly clear given what I have written just a few lines up?
copy (destination, source) or
assign (identifier, value)
NameList::Add (devices.Get (3), "Node 3/eth0");
I think of conceptually _Add_ing an association of the name "Node 3/eth0"
with/to the object returned from devices.Get (3).
Abstractly, you can think of assigning a value -- the string "Node 3/etho0"
-- to an object _identified_ by the pointer returned from the devices
container.
At this point, I would generally come up with more analogies with common
functions to try and uncover where we're not connecting, but you don't
really want me to write more words to explain my position, do you :-)
So, I'll just leave with:
objectname = "Node 3/eth0";
strcpy (object.name, "Node 3/eth0");
assign (object.name, "Node 3/eth0);
assign (devices.Get (3), "Node 3/eth0");
NameList::Add (devices.Get (3), "Node 3/eth0");
I must admit I'm really having a hard time seeing what it is you are
objecting to. Is the method name confusing? Should it be more like
AssociateNameTo (devices.Get (3), "Node 3/eth0")?
-- Craig
More information about the Ns-developers
mailing list