O'Reilly logo

Extended STL, Volume 1: Collections and Iterators by Matthew Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required