2002-01-28 Phil Edwards <pme@gcc.gnu.org>
[official-gcc.git] / libstdc++-v3 / docs / doxygen / doxygroups.cc
blobd2bda88f8ecdc32a58247eacc7debd086a44b4d7
2 /*
3 This just provides documentation for stuff that doesn't need to be in the
4 source headers themselves. It is a ".cc" file for the sole cheesy reason
5 that it triggers many different text editors into doing Nice Things when
6 typing comments. However, it is mentioned nowhere except the *cfg.in files.
7 Pieces separated by '// //' lines will usually not be presented to the
8 user on the same page.
9 */
11 // // // // // // // // // // // // // // // // // // // // // // // //
12 /** @namespace std
13 * @brief Everything defined by the ISO C++ Standard is within namespace std.
15 /** @namespace __gnu_cxx
16 * @brief Non-standard things.
18 * This namespace is used for
19 * - sequestering internal (implementation-only) names away from the
20 * global namespace
21 * - GNU extensions
23 * This is still fluid and changing rapidly.
26 // // // // // // // // // // // // // // // // // // // // // // // //
27 /** @addtogroup SGIextensions STL extensions from SGI
28 Because libstdc++-v3 based its implementation of the STL subsections of
29 the library on the SGI 3.3 implementation, we inherited their extensions
30 as well.
32 They are additionally documented in the
33 <a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">
34 online documentation</a>, a copy of which is also shipped with the
35 library source code (in .../docs/html/documentation.html). You can also
36 read the documentation <a href="http://www.sgi.com/tech/stl/">on SGI's
37 site</a>, which is still running even though the code is not maintained.
39 <strong>NB</strong> that the following notes are pulled from various
40 comments all over the place, so they may seem stilted.
41 <hr>
44 // // // // // // // // // // // // // // // // // // // // // // // //
45 // This is standalone because, unlike the functor introduction, there is no
46 // single header file which serves as a base "all containers must include
47 // this header". We do some quoting of 14882 here.
48 /** @addtogroup Containers Containers
49 Containers are collections of objects.
51 A container may hold any type which meets certain requirements, but the type
52 of contained object is chosen at compile time, and all objects in a given
53 container must be of the same type. (Polymorphism is possible by declaring a
54 container of pointers to a base class and then populating it with pointers to
55 instances of derived classes. Variant value types such as the @c any class
56 from <a href="http://www.boost.org/">Boost</a> can also be used.
58 All contained types must be @c Assignable and @c CopyConstructible.
59 Specific containers may place additional requirements on the types of
60 their contained objects.
62 Containers manage memory allocation and deallocation themselves when
63 storing your objects. The objects are destroyed when the container is
64 itself destroyed. Note that if you are storing pointers in a container,
65 @c delete is @e not automatically called on the pointers before destroying them.
67 All containers must meet certain requirements. They would be listed here
68 except I'm not certain how much of 14882 can be reproduced without a
69 copyright violation. Reproducing Tables 65 through 69 is a lot of typing...
71 The standard containers are further refined into
72 @link Sequences Sequences@endlink and
73 @link Assoc_containers Associative Containers@endlink.
76 /** @addtogroup Sequences Sequences
77 Sequences arrange a collection of objects into a strictly linear order.
79 The differences between sequences are usually due to one or both of the
80 following:
81 - memory management
82 - algorithmic complexity
84 As an example of the first case, @c vector is required to use a contiguous
85 memory layout, while other sequences such as @c deque are not.
87 The prime reason for choosing one sequence over another should be based on
88 the second category of differences, algorithmic complexity. For example, if
89 you need to perform many inserts and removals from the middle of a sequence,
90 @c list would be ideal. But if you need to perform constant-time access to
91 random elements of the sequence, then @c list should not be used.
94 /** @addtogroup Assoc_containers Associative Containers
95 Associative containers allow fast retrieval of data based on keys.
97 Each container type is parameterized on a @c Key type, and an ordering
98 relation used to sort the elements of the container.
101 // // // // // // // // // // // // // // // // // // // // // // // //