]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | ++++++++++++++++++++++++++++++++++ |
2 | |Boost| Pointer Container Library | |
3 | ++++++++++++++++++++++++++++++++++ | |
4 | ||
5 | .. |Boost| image:: boost.png | |
6 | ||
7 | Class ``reversible_ptr_container`` | |
8 | ------------------------------------ | |
9 | ||
10 | This class is not a real class that can be found in the library. | |
11 | Its purpose is to present the general interface of all the pointer containers. | |
12 | ||
13 | **Hierarchy:** | |
14 | ||
15 | - ``reversible_ptr_container`` | |
16 | ||
17 | - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_ | |
18 | ||
19 | - `ptr_vector <ptr_vector.html>`_ | |
20 | - `ptr_list <ptr_list.html>`_ | |
21 | - `ptr_deque <ptr_deque.html>`_ | |
22 | - `ptr_array <ptr_array.html>`_ | |
23 | ||
24 | - `associative_ptr_container <associative_ptr_container.html>`_ | |
25 | ||
26 | - `ptr_set_adapter <ptr_set_adapter.html>`_ | |
27 | - `ptr_multiset_adapter <ptr_multiset_adapter.html>`_ | |
28 | - `ptr_map_adapter <ptr_map_adapter.html>`_ | |
29 | - `ptr_multi_map_adapter <ptr_multimap_adapter.html>`_ | |
30 | ||
31 | - `ptr_set <ptr_set.html>`_ | |
32 | - `ptr_multi_set <ptr_multiset.html>`_ | |
33 | - `ptr_map <ptr_map.html>`_ | |
34 | - `ptr_multimap <ptr_multimap.html>`_ | |
35 | ||
36 | **Navigate:** | |
37 | ||
38 | - `home <ptr_container.html>`_ | |
39 | - `reference <reference.html>`_ | |
40 | ||
41 | **synopsis:** | |
42 | ||
43 | .. parsed-literal:: | |
44 | ||
45 | namespace boost | |
46 | { | |
47 | template | |
48 | < | |
49 | class T, | |
50 | class CloneAllocator, | |
51 | class VoidPtrContainer | |
52 | > | |
53 | class reversible_ptr_container | |
54 | { | |
55 | public: // `typedefs`_ | |
56 | typedef T* value_type; | |
57 | typedef T& reference; | |
58 | typedef const T& const_reference; | |
59 | typedef *implementation defined* iterator; | |
60 | typedef *implementation defined* const_iterator; | |
61 | typedef typename VoidPtrContainer::differnce_type difference_type; | |
62 | typedef typename VoidPtrContainer::size_type size_type; | |
63 | typedef typename VoidPtrContainer::allocator_type allocator_type; | |
64 | typedef *implementation defined* reverse_iterator; | |
65 | typedef *implementation defined* const_reverse_iterator; | |
66 | typedef *implementation defined* auto_type; | |
67 | ||
68 | public: // `construct/copy/destroy`_ | |
69 | reversible_ptr_container(); | |
70 | explicit reversible_ptr_container( const reversible_ptr_container& r ); | |
71 | template< class Derived > | |
72 | explicit reversible_ptr_container( const reversible_ptr_container<Derived>& r ); | |
73 | explicit reversible_ptr_container( std::auto_ptr<reversible_ptr_container> r ); | |
74 | template< class InputIterator > | |
75 | reversible_ptr_container( InputIterator first, InputIterator last ); | |
76 | ||
77 | ~reversible_ptr_container(); | |
78 | ||
79 | reversible_ptr_container& operator=( const reversible_ptr_container& r ); | |
80 | template<class Derived> | |
81 | reversible_ptr_container& operator=( const reversible_ptr_container<Derived>& r ); | |
82 | reversible_ptr_container& operator=( std::auto_ptr<reversible_ptr_container> r ); | |
83 | allocator_type get_allocator() const; | |
84 | ||
85 | public: // `iterators`_ | |
86 | iterator begin(); | |
87 | const_iterator begin() const; | |
88 | iterator end(); | |
89 | const_iterator end() const; | |
90 | reverse_iterator rbegin(); | |
91 | const_reverse_iterator rbegin() const; | |
92 | reverse_iterator rend(); | |
93 | const_reverse_iterator rend() const; | |
94 | ||
95 | public: // `capacity`_ | |
96 | size_type size() const; | |
97 | size_type max_size() const; | |
98 | bool empty() const; | |
99 | ||
100 | public: // `modifiers`_ | |
101 | void swap( reversible_ptr_container& r ); | |
102 | void clear(): | |
103 | VoidPtrContainer& base(); | |
104 | const VoidPtrContainer& base() const; | |
105 | ||
106 | public: // `pointer container requirements`_ | |
107 | auto_type replace( iterator position, T* x ); | |
108 | template< class U > | |
109 | auto_type replace( iterator position, std::auto_ptr<U> x ); | |
110 | std::auto_ptr<reversible_ptr_container> clone() const; | |
111 | std::auto_ptr<reversible_ptr_container> release(); | |
112 | auto_type release( iterator position ); | |
113 | ||
114 | }; // class 'reversible_ptr_container' | |
115 | ||
116 | // `comparison`_ | |
117 | template < class T, class CA, class VPC > | |
118 | bool operator==( const reversible_ptr_container<T,CA,VPC>& x, | |
119 | const reversible_ptr_container<T,CA,VPC>& y); | |
120 | ||
121 | template < class T, class CA, class VPC > | |
122 | bool operator<( const reversible_ptr_container<T,CA,VPC>& x, | |
123 | const reversible_ptr_container<T,CA,VPC>& y); | |
124 | ||
125 | template < class T, class CA, class VPC > | |
126 | bool operator!=( const reversible_ptr_container<T,CA,VPC>& x, | |
127 | const reversible_ptr_container<T,CA,VPC>& y); | |
128 | ||
129 | template < class T, class CA, class VPC > | |
130 | bool operator>( const reversible_ptr_container<T,CA,VPC>& x, | |
131 | const reversible_ptr_container<T,CA,VPC>& y); | |
132 | ||
133 | template < class T, class CA, class VPC > | |
134 | bool operator>=( const reversible_ptr_container<T,CA,VPC>& x, | |
135 | const reversible_ptr_container<T,CA,VPC>& y); | |
136 | ||
137 | template < class T, class CA, class VPC > | |
138 | bool operator<=( const reversible_ptr_container<T,CA,VPC>& x, | |
139 | const reversible_ptr_container<T,CA,VPC>& y); | |
140 | ||
141 | template< class T, class CA, class VPC > | |
142 | void swap( reversible_ptr_container<T,CA,VPC>& x, | |
143 | reversible_ptr_container<T,CA,VPC>& y ); | |
144 | ||
145 | // cloneability_ | |
146 | template< class T, class CA, class VPC > | |
147 | reversible_ptr_container<T,CA,VPC>* | |
148 | new_clone( const reversible_ptr_container<T,CA,VPC>& r ); | |
149 | ||
150 | // `null predicate`_ | |
151 | template< class Iterator > | |
152 | bool is_null( Iterator i ); | |
153 | ||
154 | // `serialization`_ | |
155 | template<class Archive, class T, class CA, class VPC> | |
156 | Content-type: text/html ]>