Compartilhar via


CGenericList Class

 
Microsoft DirectShow 9.0

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, the following list types are defined:

typedef CGenericList<CBaseObject> CBaseObjectList;
typedef CGenericList<IUnknown> CBaseInterfaceList;

Requirements

**  Header:** Declared in Wxlist.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

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