Share via


CAtlList Class

This class provides methods for creating and managing a list object.

template<
   typename E,
   class ETraits = CElementTraits< E >
>
class CAtlList

Parameters

  • E
    The element type.

  • ETraits
    The code used to copy or move elements. See CElementTraits Class for more details.

Remarks

The CAtlList class supports ordered lists of nonunique objects accessible sequentially or by value. CAtlList lists behave like doubly linked lists. Each list has a head and a tail, and new elements (or lists in some cases) can be added to either end of the list, or inserted before or after specific elements.

Most of the CAtlList methods make use of a position value. This value is used by the methods to reference the actual memory location where the elements are stored, and should not be calculated or predicted directly. If it is necessary to access the nth element in the list, the method CAtlList::FindIndex will return the corresponding position value for a given index. The methods CAtlList::GetNext and CAtlList::GetPrev can be used to iterate through the objects in the list.

For more information regarding the collection classes available with ATL, see ATL Collection Classes.

Requirements

Header: atlcoll.h

See Also

Reference

CList Class

Other Resources

CAtlList Members

ATL Class Overview