Decision 1: Determine the Collection Type
First, determine the general collection type.
Figure 10 – Start: Is the data accessed by key or position?
1. Is the data accessed by key or position? Data access by position is either numerical or in relation to the beginning or end of a container. Data access by key normally finds the item based on its key.
2. Is the key also the value? The key can either be a value that is associated with the item or the item itself.
3. Do references to data need to be preserved after insertion or deletion? If the references to data become invalid after an insertion or deletion operation, the references must be obtained again from the container.
Based on these questions, you’ll have chosen either a set, map, list, or vector.
Now, choose either a collectable class or a template class. If your container type is RWCollectable, you will usually use one of the RWCollectable Classes ; otherwise, use a template class.
Choose: