©Copyright 1999 Rogue Wave Software
Chapter 22: Glossary
bidirectional iterator
An iterator that can be used for reading and writing, and which can move in either a forward or backward direction.
binary function
A function that requires two arguments.
binder
A function adaptor that is used to convert a two-argument binary function object into a one-argument unary function object, by binding one of the argument values to a specific constant.
constant iterator
An iterator that can be used only for reading values, which cannot be used to modify the values in a sequence.
container class
A class used to hold a collection of similarly typed values. The container classes provided by the standard library include vector, list, deque, set, map, stack, queue, and priority_queue.
deque
An indexable container class. Elements can be accessed by their position in the container. Provides fast random access to elements. Additions to either the front or the back of a deque are efficient. Insertions into the middle are not efficient.
forward iterator
An iterator that can be used either for reading or writing, but which moves only forward through a collection.
function object
An instance of a class that defines the parenthesis operator as one of its member functions. When a function object is used in place of a function, the parenthesis member function will be executed when the function would normally be invoked.
generic algorithm
A templated algorithm that is not specialized to any specific container type. Because of this, generic algorithms can be used with a wide variety of different forms of container.
heap
A way of organizing a collection so as to permit rapid insertion of new values, and rapid access to and removal of the largest value of the collection.
heterogeneous collection
A collection of values that are not all of the same type. In the standard library a heterogeneous collection can only be maintained by storing pointers to objects, rather than objects themselves.
insert iterator
An adaptor used to convert iterator write operations into insertions into a container.
iterator
A generalization of the idea of a pointer. An iterator denotes a specific element in a container, and can be used to cycle through the elements being held by a container.
generator
A function that can potentially return a different value each time it is invoked. A random number generator is one example.
input iterator
An iterator that can be used to read values in sequence, but cannot be used for writing.
list
A linear container class. Elements are maintained in sequence. Provides fast access only to the first and last elements. Insertions into the middle of a list are efficient.
map
An indexed and ordered container class. Unlike a vector or deque, the index values for a map can be any ordered data type (such as a string or character). Values are maintained in sequence, and can be efficiently inserted, accessed or removed in any order.
multimap
A form of map that permits multiple elements to be indexed using the same value.
multiset
A form of set that permits multiple instances of the same value to be maintained in the collection.
negator
An adaptor that converts a predicate function object, producing a new function object that when invoked yields the opposite value.
ordered collection
A collection in which all values are ordered according to some binary comparison operator. The set data type automatically maintains an ordered collection. Other collections (vector, deque, list) can be converted into an ordered collection.
output iterator
An iterator that can be used only to write elements into a container, it cannot be used to read values.
past the end iterator
An iterator that marks the end of a range of values, such as the end of the set of values maintained by a container.
predicate
A function or function object that when invoked returns a boolean (true/false) value or an integer value.
predicate function
priority_queue
An adaptor container class, usually built on top of a vector or deque. The priority queue is designed for rapidly accessing and removing the largest element in the collection.
queue
An adaptor container class, usually built on top of a list or deque. The queue provides rapid access to the topmost element. Elements are removed from a queue in the same order they are inserted into the queue.
random access iterator
An iterator that can be subscripted, so as to access the values in a container in any order.
range
A subset of the elements held by a container. A range is typically specified by two iterators.
reverse iterator
An iterator that moves over a sequence of values in reverse order, such as back to front.
sequence
A portion or all of the elements held by a container. A sequence is usually described by a range.
set
A ordered container class. The set container is optimized for insertions, removals, and tests for inclusion.
stack
An adaptor container class, built usually on top of a vector or deque. The stack provides rapid access to the topmost element. Elements are removed from a stack in the reverse of the order they are inserted into the stack.
stream iterator
An adaptor that converts iterator operations into stream operations. Can be use to either read from or write to an iostream.
unary function
A function that requires only one argument. Applying a binder to a binary function results in a unary function.
vector
An indexable container class. Elements are accessed using a key that represents their position in the container. Provides fast random access to elements. Addition to the end of a vector is efficient. Insertion into the middle is not efficient.
wide string
A string with 16-bit characters. Wide strings are necessary for many non-roman alphabets, i.e., Japanese.