CGenericList class

CGenericList Class Hierarchy

The CGenericList class template that implements a type-specific list. For more information, see CBaseList.

To use this template, declare a variable of type CGenericList with a template argument that defines the type of object in the list. For example, the following statement declares a list of CBaseFilter objects:


CGenericList<CBaseFilter> myFilterList("Filters"); 

For convenience, Wxlist.h defines the following list types:

typedef CGenericList<CBaseObject> CBaseObjectList;
typedef CGenericList<IUnknown> CBaseInterfaceList;
Public MethodsDescription
CGenericList Constructor method.
~CGenericList Destructor method.
GetHeadPosition Retrieves the position of the first item in the list.
GetTailPosition Retrieves the position of the last item of the list.
GetCount Retrieves the number of items in the list.
GetNext Retrieves the item at the specified position, and advances the position.
Get Retrieves the item at the specified position.
GetHead Retrieves the item at the head of the list.
RemoveHead Removes the first item in the list.
RemoveTail Removes the last item in the list.
Remove Removes the item at the specified position.
AddBefore Inserts an item or list before the specified position.
AddAfter Inserts an item or list after the specified position.
AddHead Adds an item or list to the front of the list.
AddTail Appends an item or list to the end of the list.
Find Retrieves the first position that holds the specified item.

 

Requirements

Header

Wxlist.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

 

 

Show: