Skip to content

Latest commit

 

History

History
46 lines (42 loc) · 1.45 KB

File metadata and controls

46 lines (42 loc) · 1.45 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager translation.priority.ht
Aggregation | Microsoft Docs
11/04/2016
cpp-windows
article
C++
aggregation [C++]
aggregate objects [C++]
7125bb8e-b269-4b50-9bba-295b467a54cc
10
mikeblome
mblome
ghogen
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

Aggregation

There are times when an object's implementor would like to take advantage of the services offered by another, prebuilt object. Furthermore, it would like this second object to appear as a natural part of the first. COM achieves both of these goals through containment and aggregation.

Aggregation means that the containing (outer) object creates the contained (inner) object as part of its creation process and the interfaces of the inner object are exposed by the outer. An object allows itself to be aggregatable or not. If it is, then it must follow certain rules for aggregation to work properly.

Primarily, all IUnknown method calls on the contained object must delegate to the containing object.

See Also

Introduction to COM
Reusing Objects