[Ns-developers] ns-3-object proposed for merge
Gustavo Carneiro
gjcarneiro at gmail.com
Fri Jan 25 16:39:25 PST 2008
On 25/01/2008, Tom Henderson <tomh at tomh.org> wrote:
>
> Mathieu Lacage wrote:
> > On Mon, 2008-01-14 at 16:30 -0800, craigdo at ee.washington.edu wrote:
> >
> >> So, finally, for those who've made it to here and have lost track,
> >>
> >> - I like our current memory management solution;
> >> - I like our interface aggregation, interface discovery solution to
> weak
> >> base class, etc.;
> >> - I'm find with collapsing iid and cid into TypeId;
> >> - I'm fine with cleaning up that scary ComponentManager code.
> >
> > Ok. Here is an implementation of the above:
> > - InterfaceId + ClassId -> TypeId
> > - iid + cid -> GetTypeId
> > - Create -> Create + CreateObject
> > - ComponentManager::Create -> TypeId::CreateObject
> >
> > http://code.nsnam.org/mathieu/ns-3-object/
> >
> > regards,
> > Mathieu
> >
>
> I would like to propose that we merge the above repository to ns-3-dev
> by next Wed Jan 30. Please review and comment to the list.
>
> One remaining issue that is not implemented in the above is whether we
> rename QueryInterface and AddInterface to something else. What about
> QueryObject and AggregateObject?
I think QueryInterface and AddInterface can remain as they are. It really
is just a matter of how you define "interface" :) Unless you are determined
to define interface as "pure" java-style interfaces, then all is ok from my
point of view.
Besides, AggregateObject has one big problem: it makes it sound like we can
just add as many objects as we like freely. This is not true. You can only
aggregate objects _of different types_. For instance, you cannot add two
OlsrAgent objects to the same Node object; doing so will result in an
assertion error.
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list