Sunday, April 19, 2009

[VC++] MFC Collection classes

Collection class
A collection class is characterized by its "shape" and by the types of its elements. The shape refers to the way the objects are organized and stored by the collection. MFC provides three basic collection shapes: lists, arrays, and maps (also known as dictionaries).


MFC provides collection classes of three categories.
Array
List
Map


Below is a list of classes under each category and type of elements each store,

MFC Array Classes

CByteArray - 8-bit bytes (BYTEs)
CWordArray - 16-bit words (WORDs)
CUIntArray - Unsigned integers (UINTs)
CPtrArray - void pointers
CObArray - CObject pointers

CStringArray - CStrings

MFC List Classes
CObList - CObject pointers
CPtrList - void pointers
CStringList - CStrings

MFC Map Classes
CMapWordToPtr - Stores void pointers keyed by WORDs
CMapPtrToWord - Stores WORDs keyed by void pointers
CMapPtrToPtr - Stores void pointers keyed by other void pointers
CMapWordToOb - Stores CObject pointers keyed by WORDs
CMapStringToOb - Stores CObject pointers keyed by strings
CMapStringToPtr - Stores void pointer keyed by strings
CMapStringToString - Stores strings keyed by other strings

No comments: