]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | [/license |
2 | ||
3 | Boost.Bimap | |
4 | ||
5 | Copyright (c) 2006-2007 Matias Capeletto | |
6 | ||
7 | Distributed under the Boost Software License, Version 1.0. | |
8 | (See accompanying file LICENSE_1_0.txt or copy at | |
9 | http://www.boost.org/LICENSE_1_0.txt) | |
10 | ||
11 | ] | |
12 | ||
13 | [/ QuickBook Document version 1.4 ] | |
14 | ||
15 | [section unconstrained_set_of Reference] | |
16 | ||
17 | [section Header "boost/bimap/unconstrained_set_of.hpp" synopsis] | |
18 | ||
19 | namespace boost { | |
20 | namespace bimaps { | |
21 | ||
22 | ||
23 | template< class KeyType > | |
24 | struct unconstrained_set_of; | |
25 | ||
26 | struct unconstrained_set_of_relation; | |
27 | ||
28 | ||
29 | } // namespace bimap | |
30 | } // namespace boost | |
31 | ||
32 | [endsect] | |
33 | ||
34 | [section unconstrained_set_of Views] | |
35 | ||
36 | An unconstrained_set_of set view is a view with no constraints. The use | |
37 | of these kind of view boost the bimap performance but the view can not | |
38 | be accessed. An unconstrained view is an empty class. | |
39 | ||
40 | namespace boost { | |
41 | namespace bimaps { | |
42 | namespace views { | |
43 | ||
44 | template< ``['-implementation defined parameter list-]`` > | |
45 | class ``['-implementation defined view name-]`` | |
46 | { | |
47 | // Empty view | |
48 | }; | |
49 | ||
50 | } // namespace views | |
51 | } // namespace bimap | |
52 | } // namespace boost | |
53 | ||
54 | ||
55 | ||
56 | In the case of a `bimap< unconstrained_set_of<Left>, ... >` | |
57 | ||
58 | In the set view: | |
59 | ||
60 | typedef signature-compatible with relation< Left, ... > key_type; | |
61 | typedef signature-compatible with relation< Left, ... > value_type; | |
62 | ||
63 | In the left map view: | |
64 | ||
65 | typedef Left key_type; | |
66 | typedef ... mapped_type; | |
67 | ||
68 | typedef signature-compatible with std::pair< Left, ... > value_type; | |
69 | ||
70 | In the right map view: | |
71 | ||
72 | typedef ... key_type; | |
73 | typedef Left mapped_type; | |
74 | ||
75 | typedef signature-compatible with std::pair< ... , Left > value_type; | |
76 | ||
77 | ||
78 | ||
79 | [#unconstrained_set_of_complexity_signature] | |
80 | ||
81 | [section Complexity signature] | |
82 | ||
83 | We adopt the scheme outlined in the | |
84 | [link complexity_signature_explanation complexity signature section]. | |
85 | An unconstrained view can not be accessed by the user, but the | |
86 | formulas to find the order of an operation for a bimap hold with | |
87 | the following definitions. | |
88 | The complexity signature of a `unconstrained_set_of` view is: | |
89 | ||
90 | * copying: `c(n) = 0` | |
91 | * insertion: `i(n) = 0` | |
92 | * hinted insertion: `h(n) = 0` | |
93 | * deletion: `d(n) = 0` | |
94 | * replacement: `r(n) = 0` | |
95 | * modifying: `m(n) = 0` | |
96 | ||
97 | [endsect] | |
98 | ||
99 | [section Serialization] | |
100 | ||
101 | Views cannot be serialized on their own, but only as part of the | |
102 | `bimap` into which they are embedded. In describing the additional | |
103 | preconditions and guarantees associated to `list_of` views with respect to | |
104 | serialization of their embedding containers, we use the concepts defined in the | |
105 | `bimap` serialization section. | |
106 | ||
107 | [blurb [*Operation:] saving of a `bimap` b to an output archive | |
108 | (XML archive) ar.] | |
109 | ||
110 | * [*Requires:] No additional requirements to those imposed by the container. | |
111 | ||
112 | [blurb [*Operation:] loading of a `bimap` b' from an input archive | |
113 | (XML archive) ar.] | |
114 | ||
115 | * [*Requires:] No additional requirements to those imposed by the container. | |
116 | ||
117 | ||
118 | [endsect] | |
119 | [endsect] | |
120 | ||
121 | [endsect] | |
122 | ||
123 |