[Ns-developers] ns-3-object proposed for merge
Tom Henderson
tomh at tomh.org
Wed Jan 30 11:38:18 PST 2008
>-----Original Message-----
>From: Gustavo Carneiro [mailto:gjcarneiro at gmail.com]
>Sent: Wednesday, January 30, 2008 12:53 AM
>To: 'Joseph Kopena'
>Cc: 'ns-developers'
>Subject: Re: [Ns-developers] ns-3-object proposed for merge
>
>On 29/01/2008, Joseph Kopena <tjkopena at cs.drexel.edu> wrote:
>>
>> On Jan 28, 2008 4:32 PM, <craigdo at ee.washington.edu> wrote:
>> > Something along the lines of,
>> >
>> > AggregateClassObject and FindClassObject or
>> > AggregateTypeObject and LocateTypeObject
>> >
>> > seem to me to convey what's happening better.
>> >
>> > That said, I have no real strong feelings about the names and won't
>> complain
>> > about QueryObject and AddObject ... much (except when I continue to say
>> > QueryInterface instead of QueryObject all the time and confuse everyone
>> I
>>
>> My two cents that either of these sounds reasonable to me, with maybe
>> a small nod to AddObject/AggegrateObject &
>> GetObject/FindObject/FetchObject. But, I found the whole notion of
>> "Interfaces" in use here non-intuitive at first, as I've been strongly
>> programmed to read "interface" in the Java sense, so I lend some
>> support to the idea of changing it (though not critical).
>
>
>I think AddObject/AggegrateObject & GetObject/FindObject/FetchObject really
>conveys the wrong meaning. Remember, this is not a simple object container,
>far from it! You can add multiple objects, but not if they are of the same
>type. For me, AddInterface and QueryInterface is the only terminology that
>conveys the correct semantics. Especially if you have background on COM.
>If you don't have background on COM you can always point people to some COM
>terminology and they'll understand (for example
>http://en.wikipedia.org/wiki/IUnknown).
Gustavo,
I agree that we're working with a container with special semantics, but the methods are really operating on Objects. To me, AddInterface again begs the question "what is an ns-3 Interface and how is it different from an Object?", besides the point that Joe brought up about Java connotations.
Based on the other feedback received, AggregateObject and GetObject seem to me like adequate choices, and we could handle in the documentation the properties of this special aggregation container. ("Aggregate" differs from "Add" in our other APIs such as AddNetDevice(), where more than one similarly typed object can be added, so maybe the name helps in this case).
- Tom
More information about the Ns-developers
mailing list