Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

Containers



Summary

A standard template library (STL) collection.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

Description

Within the standard template library, collection classes are often described as containers. A container stores a collection of other objects and includes basic functions that support the use of generic algorithms. Containers come in two types: sequences and associative containers. They are further distinguished by the type of iterator they support.

A sequence supports a linear arrangement of single elements. vector, list, deque, bitset, and string fall into this category. Associative containers map values onto keys, which allows for retrieval of the values based on the keys. The STL includes the map, multimap, set, and multiset associative containers. map and multimap store the value and the key separately, and allow for fast retrieval of the value, based upon fast retrieval of the key. set and multiset store only keys allowing fast retrieval of the key itself.

Container Requirements

Containers within the STL must meet the following requirements. Sequences and associative containers must also meet their own separate sets of requirements. The requirements for containers are:

Reversible Containers

A container may be reversible. Essentially, a reversible container includes a reverse iterator that allows traversal of the collection in a direction opposite that of the default iterator. A reversible container must meet the following requirements in addition to those listed above:

Sequences

In addition to the requirements for containers, the following requirements hold for sequences:

Associative Containers

In addition to the requirements for a container, the following requirements hold for associative containers:

See Also

bitset, deque, list, map, multimap, multiset, priority_queue, queue, set, stack, vector



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998