Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

The tutorial

Roadmap
Discovering the new framework
Controlling set types
Tagging
The set of relations type
Unconstrained Sets
Updating a Bimap
Complete instantiation scheme
  1. Boost.Bimap is intuitive because it is based on the standard template library. New concepts are however presented to extend the mapping framework to bidirectional maps. The first step is to gain a firm grasp of the new framework. The first section (Discovering the new framework) aims to explain this.
  2. Boost.Bimap offers much more than just a one-to-one ordered unique bidirectional map. It is possible to control the set type of each side of the relationship that the bimap represents, giving one-to-many containers, hashed bidirectional containers and others that may be more suitable to the the task at hand. The second section (Controlling set types) explains how to instantiate a bimap with different collection constraints.
  3. The types of a bimap can be tagged so that each side is accessible by something closer to the problem than left and right. This leads to more readable, self-documenting code. The fourth section (Tagging) shows how to use this feature.
  4. What is perhaps the hardest issue to understand is the subtle problem of the set type of relations. The section (The "set of relations" type) explains this problem and how to create new types of bidirectional maps.
  5. The extended mapping framework allows to disable a view of a bimap, including the standard mapping containers as a particular case. The section Unconstrained Sets explains how they work.
  6. In the section Updating a Bimap we will learn how to modify the elements of this container.
  7. The final section (Complete Instantiation Scheme) summarizes bimap instantiation and explains how change the allocator type to be used.
Copyright © 2006 Matias Capeletto

PrevUpHomeNext