[Ns-developers] A question about object aggregate
Gustavo Carneiro
gjcarneiro at gmail.com
Mon Jul 14 08:24:34 PDT 2008
2008/7/13 valpassing <valpassing at gmail.com>:
> Hi,
>
> >From the code, it shows that aggregate objects have different TypeId
> each other. Can someone explain to me that what is the reason that
> only object with different TypeId can be aggregated?
The intention of AggregateObject/GetObject is to provide a COM-like
interface introspection mechanism. These methods used to be called
AddInterface/QueryInterface, but some developers had the (unfortunate imho)
idea of changing the names.
If you want generic object aggregation I may suggest a simple std::list<
Ptr<Object> > member variable in your class.
--
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