Sunday, October 18, 2009

ns-3 object aggregation

Problem:

Coupling between models hinders software reuse in different configurations.
-must intrusively edit the base class for this
-or, leads to C++ downcasting
-know as the C++ "weak base class" problem

So, what is base class?

It is a class that had no superclass and usually at base of tree of subclasses.


ns-3 solution: an object aggregation model

-object can be aggregated to other objects at run-time
-a "query interface" is provided to ask whether an particular object is aggregated
-similar in spirit to COM or Bonobo object

but keep in mind that aggregation is different from composition.

No comments:

Post a Comment