1 ++++++++++++++++++++++++++++++++++
2 |Boost| Pointer Container Library
3 ++++++++++++++++++++++++++++++++++
5 .. |Boost| image:: boost.png
10 A ``ptr_list<T>`` is a pointer container that uses an underlying ``std:list<void*>``
11 to store the pointers.
15 - `reversible_ptr_container <reversible_ptr_container.html>`_
17 - `ptr_sequence_adapter <ptr_sequence_adapter.html>`_
19 - `ptr_vector <ptr_vector.html>`_
21 - `ptr_deque <ptr_deque.html>`_
22 - `ptr_array <ptr_array.html>`_
26 - `home <ptr_container.html>`_
27 - `reference <reference.html>`_
40 class CloneAllocator = heap_clone_allocator,
41 class Allocator = std::allocator<void*>
43 class ptr_list : public ptr_sequence_adapter
46 std::list<void*,Allocator>,
52 void push_front( T* x );
54 void push_front( std::auto_ptr<U> x );
55 auto_type pop_front();
57 public: // `list operations`_
60 }; // class 'ptr_list'
62 } // namespace 'boost'
73 - ``void push_front( T* x );``
75 - Requirements: ``x != 0``
77 - Effects: Inserts the pointer into container and takes ownership of it
79 - Throws: ``bad_pointer`` if ``x == 0``
81 - Exception safety: Strong guarantee
83 - ``template< class U > void push_front( std::auto_ptr<U> x );``
85 - Effects: ``push_front( x.release() );``
88 - ``void push_front( const T& x );``
90 - Effects: push_front( allocate_clone( x ) );
92 - Exception safety: Strong guarantee
94 - ``auto_type pop_front():``
96 - Requirements:``not empty()``
98 - Effects: Removes the first element in the container
100 - Postconditions: ``size()`` is one less
102 - Throws: ``bad_ptr_container_operation`` if ``empty() == true``
104 - Exception safety: Strong guarantee
106 .. _`list operations`:
108 Semantics: list operations
109 ^^^^^^^^^^^^^^^^^^^^^^^^^^
112 - ``void splice( iterator before, ptr_list& x );``
114 - Requirements:``&x != this``
116 - Effects: inserts the all of ``x``'s elements before ``before``
118 - Postconditions: ``x.empty()``
122 - Remark: prefer this to ``transfer( before, x );``
124 - ``void splice( iterator before, ptr_list& x, iterator i );``
128 - ``void splice( iterator before, ptr_list& x, iterator first, iterator last );``
132 - ``void merge( ptr_list& x );``
136 - ``template< typename Compare >
137 void merge( ptr_list& x, Compare comp );``
141 - ``void reverse();``
143 - Effects: reverses the underlying sequence
151 :Copyright: Thorsten Ottosen 2004-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt__).
153 __ http://www.boost.org/LICENSE_1_0.txt