Blind aggregation means the outer object does not have code that looks for specific interfaces implemented in aggregated objects. Instead, if an unknown interface ID (IID) is passed into
QueryInterface
,
the outer object calls into the nondelegating
IUnknown
of each aggregated object to see if the interface is supported.
The following pseudo-code makes the following assumptions:
- The outer object has aggregated two inner objects:
IO1
and IO2
.
IO1
implements interface IX1
; IO2
implements interface IX2
.
- The outer object implements interface
IX0
.
- The outer object has nondelegating
IUnknown
interface pointers into each aggregated object in member variables m_pIUnknown_IO1
and m_pIUnknown_IO2
.