OOPortal OOPortal


COM Aggregation   «Prev  Next»
Lesson 3 Aggregation review
Objective Review aggregation.

COM Aggregation Review

Before jumping into the technical details of aggregation, let us step back and summarize aggregation:
  1. Aggregation supports a composition of objects where the outer object appears to implement the inner object's interfaces. The collection of aggregated objects and the outer object act as one COM object.
  2. Aggregated objects (inner objects) directly expose their interfaces. Unlike containment/delegation, there is no intermediate interface in the outer object that stands between the client and the inner object's interface.
  3. Even though an aggregated/inner object's interfaces are directly exposed to the client, the client is not aware of the aggregated (inner) objects.
  4. Aggregation scenarios can be multilevel. For example, in the example presented in the previous module, the client uses FileManager. FileManager aggregates the FindFile, ReadWriteFile, and ArchiveFile components. The FindFile component aggregates LocalFindFile and RemoteFindFile.

Multilevel aggregation
Multilevel aggregation consisting of IUnknown and InnerCOMObj, IF2