This class provides the implementation for a COM enumerator interface where the items being enumerated are stored in an array.
Public Data Members
A pointer to the first item in the array.
Copy flags passed through Init.
A pointer to the location just beyond the last item in the array.
A pointer to the current item in the array.
The IUnknown pointer of the object supplying the collection being enumerated.
CComEnumImpl provides the implementation for a COM enumerator interface where the items being enumerated are stored in an array. This class is analogous to the IEnumOnSTLImpl class, which provides an implementation of an enumerator interface based on an STL container.
For details on further differences between CComEnumImpl and IEnumOnSTLImpl, see CComEnumImpl::Init.
Typically, you will not need to create your own enumerator class by deriving from this interface implementation. If you want to use an ATL-supplied enumerator based on an array, it is more common to create an instance of CComEnum.
However, if you do need to provide a custom enumerator (for example, one that exposes interfaces in addition to the enumerator interface), you can derive from this class. In this situation, it is likely that you'll need to override the CComEnumImpl::Clone method to provide your own implementation.
For more information, see ATL Collections and Enumerators.