2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libstdc++-v3 / doc / doxygen / doxygroups.cc
blobd0adec9e5fb5da1a3e476d2669bbdc9ec67c9e62
1 /*
2 Copyright (C) 2001, 2002, 2005, 2008 Free Software Foundation, Inc.
3 See license.html for license.
5 This just provides documentation for stuff that doesn't need to be in the
6 source headers themselves. It is a ".cc" file for the sole cheesy reason
7 that it triggers many different text editors into doing Nice Things when
8 typing comments. However, it is mentioned nowhere except the *cfg.in files.
10 Some actual code (declarations) is exposed here, but no compiler ever
11 sees it. The decls must be visible to doxygen, and sometimes their real
12 declarations are not visible, or not visible in a way we want.
14 Pieces separated by '// //' lines will usually not be presented to the
15 user on the same page.
18 // // // // // // // // // // // // // // // // // // // // // // // //
19 /** @namespace std
20 * @brief ISO C++ entities toplevel namespace is std.
22 /** @namespace std::__detail
23 * @brief Implementation details not part of the namespace std interface.
25 /** @namespace std::tr1
26 * @brief ISO C++ TR1 entities toplevel namespace is std::tr1.
28 /** @namespace std::tr1::__detail
29 * @brief Implementation details not part of the namespace std::tr1 interface.
31 /** @namespace std::regex_constants
32 * @brief ISO C++ 0x entities sub namespace for regex.
34 /** @namespace std::placeholders
35 * @brief ISO C++ 0x entities sub namespace for functional.
37 /** @namespace std::this_thread
38 * @brief ISO C++ 0x entities sub namespace for thread.
40 /** @namespace __gnu_cxx
41 * @brief GNU extensions for public use.
43 /** @namespace __gnu_cxx::__detail
44 * @brief Implementation details not part of the namespace __gnu_cxx
45 * interface.
47 /** @namespace __gnu_internal
48 * @brief GNU implemenation details, not for public use or
49 * export. Used only when anonymous namespaces cannot be substituted.
51 // // // // // // // // // // // // // // // // // // // // // // // //
52 /** @addtogroup SGIextensions STL extensions from SGI
53 Because libstdc++ based its implementation of the STL subsections of
54 the library on the SGI 3.3 implementation, we inherited their extensions
55 as well.
57 They are additionally documented in the
58 <a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">
59 online documentation</a>, a copy of which is also shipped with the
60 library source code (in .../docs/html/documentation.html). You can also
61 read the documentation <a href="http://www.sgi.com/tech/stl/">on SGI's
62 site</a>, which is still running even though the code is not maintained.
64 <strong>NB</strong> that the following notes are pulled from various
65 comments all over the place, so they may seem stilted.
66 <hr>
69 // // // // // // // // // // // // // // // // // // // // // // // //
70 // This is standalone because, unlike the functor introduction, there is no
71 // single header file which serves as a base "all containers must include
72 // this header". We do some quoting of 14882 here.
73 /** @addtogroup Containers Containers
74 Containers are collections of objects.
76 A container may hold any type which meets certain requirements, but the type
77 of contained object is chosen at compile time, and all objects in a given
78 container must be of the same type. (Polymorphism is possible by declaring a
79 container of pointers to a base class and then populating it with pointers to
80 instances of derived classes. Variant value types such as the @c any class
81 from <a href="http://www.boost.org/">Boost</a> can also be used.
83 All contained types must be @c Assignable and @c CopyConstructible.
84 Specific containers may place additional requirements on the types of
85 their contained objects.
87 Containers manage memory allocation and deallocation themselves when
88 storing your objects. The objects are destroyed when the container is
89 itself destroyed. Note that if you are storing pointers in a container,
90 @c delete is @e not automatically called on the pointers before destroying them.
92 All containers must meet certain requirements, summarized in
93 <a href="tables.html">tables</a>.
95 The standard containers are further refined into
96 @link Sequences Sequences@endlink and
97 @link Assoc_containers Associative Containers@endlink.
100 /** @addtogroup Sequences Sequences
101 Sequences arrange a collection of objects into a strictly linear order.
103 The differences between sequences are usually due to one or both of the
104 following:
105 - memory management
106 - algorithmic complexity
108 As an example of the first case, @c vector is required to use a contiguous
109 memory layout, while other sequences such as @c deque are not.
111 The prime reason for choosing one sequence over another should be based on
112 the second category of differences, algorithmic complexity. For example, if
113 you need to perform many inserts and removals from the middle of a sequence,
114 @c list would be ideal. But if you need to perform constant-time access to
115 random elements of the sequence, then @c list should not be used.
117 All sequences must meet certain requirements, summarized in
118 <a href="tables.html">tables</a>.
121 /** @addtogroup Assoc_containers Associative Containers
122 Associative containers allow fast retrieval of data based on keys.
124 Each container type is parameterized on a @c Key type, and an ordering
125 relation used to sort the elements of the container.
127 There should be more text here.
129 All associative containers must meet certain requirements, summarized in
130 <a href="tables.html">tables</a>.
133 // // // // // // // // // // // // // // // // // // // // // // // //
134 /** @namespace abi
135 * @brief The cross-vendor C++ Application Binary Interface. A
136 * namespace alias to __cxxabiv1.
138 * A brief overview of an ABI is given in the libstdc++ FAQ, question
139 * 5.8 (you may have a copy of the FAQ locally, or you can view the online
140 * version at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_8).
142 * GCC subscribes to a relatively-new cross-vendor ABI for C++, sometimes
143 * called the IA64 ABI because it happens to be the native ABI for that
144 * platform. It is summarized at http://www.codesourcery.com/cxx-abi/
145 * along with the current specification.
147 * For users of GCC greater than or equal to 3.x, entry points are
148 * available in <cxxabi.h>, which notes, <em>"It is not normally
149 * necessary for user programs to include this header, or use the
150 * entry points directly. However, this header is available should
151 * that be needed."</em>
154 namespace abi {
156 @brief New ABI-mandated entry point in the C++ runtime library for demangling.
158 @param mangled_name A NUL-terminated character string containing the name
159 to be demangled.
161 @param output_buffer A region of memory, allocated with malloc, of
162 @a *length bytes, into which the demangled name
163 is stored. If @a output_buffer is not long enough,
164 it is expanded using realloc. @a output_buffer may
165 instead be NULL; in that case, the demangled name is
166 placed in a region of memory allocated with malloc.
168 @param length If @a length is non-NULL, the length of the buffer containing
169 the demangled name is placed in @a *length.
171 @param status @a *status is set to one of the following values:
172 - 0: The demangling operation succeeded.
173 - -1: A memory allocation failiure occurred.
174 - -2: @a mangled_name is not a valid name under the C++ ABI
175 mangling rules.
176 - -3: One of the arguments is invalid.
178 @return A pointer to the start of the NUL-terminated demangled name, or NULL
179 if the demangling fails. The caller is responsible for deallocating
180 this memory using @c free.
183 The demangling is performed using the C++ ABI mangling rules, with
184 GNU extensions. For example, this function is used
185 in __gnu_cxx::__verbose_terminate_handler. See
186 http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#5 for other
187 examples of use.
189 @note The same demangling functionality is available via libiberty
190 (@c <libiberty/demangle.h> and @c libiberty.a) in GCC 3.1 and later, but that
191 requires explicit installation (@c --enable-install-libiberty) and uses a
192 different API, although the ABI is unchanged.
194 char* __cxa_demangle (const char* mangled_name, char* output_buffer,
195 size_t* length, int* status);
196 } // namespace abi
198 // // // // // // // // // // // // // // // // // // // // // // // //
199 /** @addtogroup binarysearch Binary search algorithms
200 These algorithms are variations of a classic binary search. They all assume
201 that the sequence being searched is already sorted.
203 The number of comparisons will be logarithmic (and as few as possible).
204 The number of steps through the sequence will be logarithmic for
205 random-access iterators (e.g., pointers), and linear otherwise.
207 The LWG has passed Defect Report 270, which notes: <em>The proposed
208 resolution reinterprets binary search. Instead of thinking about searching
209 for a value in a sorted range, we view that as an important special
210 case of a more general algorithm: searching for the partition point in a
211 partitioned range. We also add a guarantee that the old wording did not:
212 we ensure that the upper bound is no earlier than the lower bound, that
213 the pair returned by equal_range is a valid range, and that the first part
214 of that pair is the lower bound.</em>
216 The actual effect of the first sentence is that a comparison functor
217 passed by the user doesn't necessarily need to induce a strict weak ordering
218 relation. Rather, it partitions the range.
221 // // // // // // // // // // // // // // // // // // // // // // // //
222 /** @addtogroup setoperations Set operation algorithms
223 These algorithms are common set operations performed on sequences that are
224 already sorted.
226 The number of comparisons will be linear.
229 // // // // // // // // // // // // // // // // // // // // // // // //
231 // // // // // // // // // // // // // // // // // // // // // // // //
232 /* * @addtogroup groupname description of group
233 placeholder text
236 // // // // // // // // // // // // // // // // // // // // // // // //
238 // vim:et:noai: