Tushar Agrawal
What is aggregation? How can we get an interface of the aggregated object?
By Tushar Agrawal in COM Interop on Aug 01 2006
  • rakesh shrivastav
    May, 2007 28

    Aggregation is a whole-part relationship. For example, a magnetron will still be magnetron if you remove it from microwave but microwave will just be a box without magnetron.

    • 0
  • Tushar Agrawal
    Aug, 2006 1

    1. Aggregation is the reuse mechanism, in which the outer object exposes interfaces from the inner object as if they were implemented on the outer object itself. This is useful when the outer object would always delegate every call to one of its interfaces to the same interface in the inner object. Aggregation is actually a specialized case of containment/delegation, and is available as a convenience to avoid extra implementation overhead in the outer object in these cases. We can get a pointer to the inner interface, calling QueryInterface of the outer object with IID of the inner interface.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS