Export (0) Print
Expand All

CAtlList Class

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

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

E

The element type.

ETraits

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

Name

Description

CAtlList::CAtlList

The constructor.

CAtlList::~CAtlList

The destructor.

Name

Description

CAtlList::AddHead

Call this method to add an element to the head of the list.

CAtlList::AddHeadList

Call this method to add an existing list to the head of the list.

CAtlList::AddTail

Call this method to add an element to the tail of this list.

CAtlList::AddTailList

Call this method to add an existing list to the tail of this list.

CAtlList::AssertValid

Call this method to confirm the list is valid.

CAtlList::Find

Call this method to search the list for the specified element.

CAtlList::FindIndex

Call this method to obtain the position of an element, given an index value.

CAtlList::GetAt

Call this method to return the element at a specified position in the list.

CAtlList::GetCount

Call this method to return the number of objects in the list.

CAtlList::GetHead

Call this method to return the element at the head of the list.

CAtlList::GetHeadPosition

Call this method to obtain the position of the head of the list.

CAtlList::GetNext

Call this method to return the next element from the list.

CAtlList::GetPrev

Call this method to return the previous element from the list.

CAtlList::GetTail

Call this method to return the element at the tail of the list.

CAtlList::GetTailPosition

Call this method to obtain the position of the tail of the list.

CAtlList::InsertAfter

Call this method to insert a new element into the list after the specified position.

CAtlList::InsertBefore

Call this method to insert a new element into the list before the specified position.

CAtlList::IsEmpty

Call this method to determine if the list is empty.

CAtlList::MoveToHead

Call this method to move the specified element to the head of the list.

CAtlList::MoveToTail

Call this method to move the specified element to the tail of the list.

CAtlList::RemoveAll

Call this method to remove all of the elements from the list.

CAtlList::RemoveAt

Call this method to remove a single element from the list.

CAtlList::RemoveHead

Call this method to remove the element at the head of the list.

CAtlList::RemoveHeadNoReturn

Call this method to remove the element at the head of the list without returning a value.

CAtlList::RemoveTail

Call this method to remove the element at the tail of the list.

CAtlList::RemoveTailNoReturn

Call this method to remove the element at the tail of the list without returning a value.

CAtlList::SetAt

Call this method to set the value of the element at a given position in the list.

CAtlList::SwapElements

Call this method to swap elements in the list.

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.

Header: atlcoll.h

Reference

Other Resources

Show:
© 2014 Microsoft