Chapter 30. Adapting COM Collections
Age and treachery will overcome youth and skill. | ||
--Fausto Coppi |
Stoke me a clipper, I’ll be back for Christmas! | ||
--Arnold J. Rimmer, Red Dwarf |
Introduction
The COM collection model represents collections with a loosely defined interface containing some or all of the following members: the methods Add()
, Clear()
, and Remove()
and the properties Count
and Item
. (When expressed in C/C++, COM properties are prefixed with get_
, e.g., get_Count()
.) The one mandatory member is _NewEnum
, which returns an enumerator in the form of a COM enumerator interface (Section 28.3). Just for grins, _NewEnum
may be either a method or a property. By convention COM collections provide enumerators with the IEnumVARIANT
interface ...
Get Extended STL, Volume 1: Collections and Iterators now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.