mirror of
https://github.com/boostorg/bimap.git
synced 2026-01-19 04:02:10 +00:00
@@ -36,7 +36,7 @@ With Boost.Bimap, you can build associative containers in which both
|
||||
types can be used as key. There is a library in Boost that already
|
||||
allows the creation of this kind of container: Boost.MultiIndex. It
|
||||
offers great flexibility and lets you construct almost any container
|
||||
that you could dream of. The framework is very clean. You migh want to
|
||||
that you could dream of. The framework is very clean. You might want to
|
||||
read this library's tutorial to learn about the power that has been
|
||||
achieved.
|
||||
|
||||
|
||||
2
doc/compiler_specifics.qbk
Executable file → Normal file
2
doc/compiler_specifics.qbk
Executable file → Normal file
@@ -41,7 +41,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
[h2 VS 7.1]
|
||||
|
||||
If a .cpp file uses more than four differents bimaps the compiler will run
|
||||
If a .cpp file uses more than four different bimaps the compiler will run
|
||||
out of symbols and issue an internal compiler error. The official solution
|
||||
in msdn is to split the .cpp in several files or upgrade your compiler.
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ map should be coded in top of this container.
|
||||
[
|
||||
Once in Boost, the library switched to the now familiar name
|
||||
"Boost.MultiIndex". Late in 2004, it formally became a member of Boost.
|
||||
Joaquin continued to enchance the library and added new features such as
|
||||
Joaquin continued to enhance the library and added new features such as
|
||||
composite keys and random-access indices.
|
||||
]]
|
||||
|
||||
@@ -71,7 +71,7 @@ the library was queued for a formal review.
|
||||
|
||||
[[2007 - Boost.Bimap]
|
||||
[
|
||||
The formal review took place at the beggining of the year and Boost.Bimap
|
||||
The formal review took place at the beginning of the year and Boost.Bimap
|
||||
was accepted in Boost.
|
||||
]]
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
can be used as key. There is a library in Boost that already allows the creation
|
||||
of this kind of container: Boost.MultiIndex. It offers great flexibility
|
||||
and lets you construct almost any container that you could dream of. The
|
||||
framework is very clean. You migh want to read this library's tutorial to
|
||||
framework is very clean. You might want to read this library's tutorial to
|
||||
learn about the power that has been achieved.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -330,9 +330,9 @@
|
||||
7.1</a>
|
||||
</h3>
|
||||
<p>
|
||||
If a .cpp file uses more than four differents bimaps the compiler will run
|
||||
out of symbols and issue an internal compiler error. The official solution
|
||||
in msdn is to split the .cpp in several files or upgrade your compiler.
|
||||
If a .cpp file uses more than four different bimaps the compiler will run out
|
||||
of symbols and issue an internal compiler error. The official solution in msdn
|
||||
is to split the .cpp in several files or upgrade your compiler.
|
||||
</p>
|
||||
<h3>
|
||||
<a name="boost_bimap.compiler_specifics.h1"></a>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<dd><p>
|
||||
Once in Boost, the library switched to the now familiar name "Boost.MultiIndex".
|
||||
Late in 2004, it formally became a member of Boost. Joaquin continued
|
||||
to enchance the library and added new features such as composite keys
|
||||
to enhance the library and added new features such as composite keys
|
||||
and random-access indices.
|
||||
</p></dd>
|
||||
<dt><span class="term">2006 - Multi Index Specialized Containers SoC project</span></dt>
|
||||
@@ -88,7 +88,7 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">2007 - Boost.Bimap</span></dt>
|
||||
<dd><p>
|
||||
The formal review took place at the beggining of the year and Boost.Bimap
|
||||
The formal review took place at the beginning of the year and Boost.Bimap
|
||||
was accepted in Boost.
|
||||
</p></dd>
|
||||
</dl>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
by step</a>
|
||||
</h4>
|
||||
<p>
|
||||
A convinience header is avaiable in the boost directory:
|
||||
A convenience header is available in the boost directory:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">bimap</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
@@ -275,7 +275,7 @@
|
||||
<p>
|
||||
If you insert <code class="computeroutput"><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="string">"one"</span><span class="special">)</span></code> and <code class="computeroutput"><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="string">"1"</span><span class="special">)</span></code> in a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span></code> the second insertion will have no effect.
|
||||
In a <code class="computeroutput"><span class="identifier">bimap</span><span class="special"><</span><span class="identifier">X</span><span class="special">,</span><span class="identifier">Y</span><span class="special">></span></code> both keys have to remain unique. The insertion
|
||||
may fail in other situtions too. Lets see an example
|
||||
may fail in other situations too. Lets see an example
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bm</span><span class="special">.</span><span class="identifier">clear</span><span class="special">();</span>
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</p>
|
||||
<p>
|
||||
In Boost.Bimap there is a better way to document the code and in the meantime
|
||||
helping you to write more mantainable and readable code. You can tag the
|
||||
helping you to write more maintainable and readable code. You can tag the
|
||||
two collections of the bimap so they can be accessed by more descriptive
|
||||
names.
|
||||
</p>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
to specify user defined names instead of the usual <code class="computeroutput"><span class="identifier">member_at</span><span class="special">::-</span><span class="identifier">Side</span><span class="special">-</span></code> tags.
|
||||
</p>
|
||||
<p>
|
||||
The possibles way to use the first parameter are:
|
||||
The possible way to use the first parameter are:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="identifier">bimap</span><span class="special"><</span> <span class="identifier">Type</span><span class="special">,</span> <span class="identifier">R</span> <span class="special">></span>
|
||||
</pre>
|
||||
|
||||
@@ -358,18 +358,18 @@
|
||||
Populations</a>
|
||||
</h6>
|
||||
<p>
|
||||
We want to store countries populations. The requeriments are:
|
||||
We want to store countries populations. The requirements are:
|
||||
</p>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
Get a list of countries in decresing order of their populations.
|
||||
Get a list of countries in decreasing order of their populations.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Given a countrie, get their population.
|
||||
Given a country, get their population.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>
|
||||
Lets create the appropiate bimap.
|
||||
Lets create the appropriate bimap.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">bimap</span><span class="special"><</span>
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: December 10, 2012 at 13:07:47 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: February 14, 2013 at 18:55:19 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
4
doc/quick_tutorial.qbk
Executable file → Normal file
4
doc/quick_tutorial.qbk
Executable file → Normal file
@@ -80,7 +80,7 @@ __RELATION_AND_PAIR__
|
||||
|
||||
[import ../example/step_by_step.cpp]
|
||||
|
||||
A convinience header is avaiable in the boost directory:
|
||||
A convenience header is available in the boost directory:
|
||||
|
||||
#include <boost/bimap.hpp>
|
||||
|
||||
@@ -123,7 +123,7 @@ However dereferencing a `bimap<X,Y>::left_iterator` returns a type that is
|
||||
|
||||
bm.left.find(1)->second = "1"; // Compilation error
|
||||
|
||||
If you insert `(1,"one")` and `(1,"1")` in a `std::map<int,std::string>` the second insertion will have no effect. In a `bimap<X,Y>` both keys have to remain unique. The insertion may fail in other situtions too. Lets see an example
|
||||
If you insert `(1,"one")` and `(1,"1")` in a `std::map<int,std::string>` the second insertion will have no effect. In a `bimap<X,Y>` both keys have to remain unique. The insertion may fail in other situations too. Lets see an example
|
||||
|
||||
bm.clear();
|
||||
|
||||
|
||||
12
doc/tutorial.qbk
Executable file → Normal file
12
doc/tutorial.qbk
Executable file → Normal file
@@ -246,12 +246,12 @@ equality operator is `std::equal_to<T>`. ]]
|
||||
[heading Countries Populations]
|
||||
|
||||
We want to store countries populations.
|
||||
The requeriments are:
|
||||
The requirements are:
|
||||
|
||||
# Get a list of countries in decresing order of their populations.
|
||||
# Given a countrie, get their population.
|
||||
# Get a list of countries in decreasing order of their populations.
|
||||
# Given a country, get their population.
|
||||
|
||||
Lets create the appropiate bimap.
|
||||
Lets create the appropriate bimap.
|
||||
|
||||
typedef bimap<
|
||||
|
||||
@@ -768,7 +768,7 @@ future programmers:
|
||||
[code_user_defined_names_untagged_version]
|
||||
|
||||
In Boost.Bimap there is a better way to document the code and
|
||||
in the meantime helping you to write more mantainable and readable code.
|
||||
in the meantime helping you to write more maintainable and readable code.
|
||||
You can tag the two collections of the bimap so they can be
|
||||
accessed by more descriptive names.
|
||||
|
||||
@@ -954,7 +954,7 @@ To summarize, this is the complete instantiation scheme.
|
||||
Additionally, the type of this two parameters can be tagged to specify
|
||||
user defined names instead of the usual `member_at::-Side-` tags.
|
||||
|
||||
The possibles way to use the first parameter are:
|
||||
The possible way to use the first parameter are:
|
||||
|
||||
bimap< Type, R >
|
||||
|
||||
|
||||
Reference in New Issue
Block a user