STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
traits.hpp
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 // Copyright (C) 2005-2013 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 3, or (at your option) any later
9 // version.
10 
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
15 
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
19 
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
24 
25 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
26 
27 // Permission to use, copy, modify, sell, and distribute this software
28 // is hereby granted without fee, provided that the above copyright
29 // notice appears in all copies, and that both that copyright notice
30 // and this permission notice appear in supporting documentation. None
31 // of the above authors, nor IBM Haifa Research Laboratories, make any
32 // representation about the suitability of this software for any
33 // purpose. It is provided "as is" without express or implied
34 // warranty.
35 
41 #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
42 #define PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
43 
46 
47 namespace __gnu_pbds
48 {
49  namespace detail
50  {
53  template<typename Key,
54  typename Mapped,
55  class Cmp_Fn,
56  template<typename Node_CItr,
57  class Node_Itr,
58  class Cmp_Fn,
59  typename _Alloc>
60  class Node_Update,
61  class Node,
62  typename _Alloc>
64  {
65  private:
67 
68  public:
69  typedef Node node;
70 
71  typedef
73  typename _Alloc::template rebind<
74  node>::other::pointer,
75  typename type_traits::value_type,
76  typename type_traits::pointer,
77  typename type_traits::const_pointer,
78  typename type_traits::reference,
79  typename type_traits::const_reference,
80  true,
81  _Alloc>
83 
84  typedef
86  typename _Alloc::template rebind<
87  node>::other::pointer,
88  typename type_traits::value_type,
89  typename type_traits::pointer,
90  typename type_traits::const_pointer,
91  typename type_traits::reference,
92  typename type_traits::const_reference,
93  true,
94  _Alloc>
96 
97  typedef
99  typename _Alloc::template rebind<
100  node>::other::pointer,
101  typename type_traits::value_type,
102  typename type_traits::pointer,
103  typename type_traits::const_pointer,
104  typename type_traits::reference,
105  typename type_traits::const_reference,
106  false,
107  _Alloc>
109 
110  typedef
112  typename _Alloc::template rebind<
113  node>::other::pointer,
114  typename type_traits::value_type,
115  typename type_traits::pointer,
116  typename type_traits::const_pointer,
117  typename type_traits::reference,
118  typename type_traits::const_reference,
119  false,
120  _Alloc>
122 
125  typedef
127  Node,
130  _Alloc>
132 
133  typedef
135  Node,
138  _Alloc>
140 
141  typedef
142  Node_Update<
145  Cmp_Fn,
146  _Alloc>
148 
149  typedef
153  Cmp_Fn,
154  _Alloc>*
156  };
157 
160  template<typename Key,
161  class Cmp_Fn,
162  template<typename Node_CItr,
163  class Node_Itr,
164  class Cmp_Fn,
165  typename _Alloc>
166  class Node_Update,
167  class Node,
168  typename _Alloc>
170  Key,
171  null_type,
172  Cmp_Fn,
173  Node_Update,
174  Node,
175  _Alloc>
176  {
177  private:
179 
180  public:
181  typedef Node node;
182 
183  typedef
185  typename _Alloc::template rebind<
186  node>::other::pointer,
187  typename type_traits::value_type,
188  typename type_traits::pointer,
189  typename type_traits::const_pointer,
190  typename type_traits::reference,
191  typename type_traits::const_reference,
192  true,
193  _Alloc>
195 
197 
198  typedef
200  typename _Alloc::template rebind<
201  node>::other::pointer,
202  typename type_traits::value_type,
203  typename type_traits::pointer,
204  typename type_traits::const_pointer,
205  typename type_traits::reference,
206  typename type_traits::const_reference,
207  false,
208  _Alloc>
210 
212 
215  typedef
217  Node,
220  _Alloc>
222 
224 
225  typedef
226  Node_Update<node_const_iterator, node_iterator, Cmp_Fn, _Alloc>
228 
229  typedef
233  Cmp_Fn,
234  _Alloc>*
236  };
237 
238  } // namespace detail
239 } // namespace __gnu_pbds
240 
241 #endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
bin_search_tree_const_node_it_< Node, point_const_iterator, point_iterator, _Alloc > node_const_iterator
Definition: traits.hpp:131
Const iterator.
Definition: point_iterators.hpp:105
A null node updator, indicating that no node updates are required.
Definition: tag_and_trait.hpp:214
Iterator.
Definition: point_iterators.hpp:282
Represents no type, or absence of type, for template tricks.
Definition: tag_and_trait.hpp:210
__gnu_pbds::null_node_update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > * null_node_update_pointer
Definition: traits.hpp:155
bin_search_tree_const_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, false, _Alloc > const_reverse_iterator
Definition: traits.hpp:209
bin_search_tree_const_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, true, _Alloc > point_const_iterator
Definition: traits.hpp:82
types_traits< Key, Mapped, _Alloc, false > type_traits
Definition: traits.hpp:66
bin_search_tree_const_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, true, _Alloc > point_const_iterator
Definition: traits.hpp:194
bin_search_tree_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, false, _Alloc > reverse_iterator
Definition: traits.hpp:121
Node_Update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > node_update
Definition: traits.hpp:147
Node_Update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > node_update
Definition: traits.hpp:227
bin_search_tree_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, true, _Alloc > point_iterator
Definition: traits.hpp:95
bin_search_tree_const_node_it_< Node, point_const_iterator, point_iterator, _Alloc > node_const_iterator
Definition: traits.hpp:221
Node iterator.
Definition: node_iterators.hpp:136
Node node
Definition: traits.hpp:69
Const node iterator.
Definition: node_iterators.hpp:58
bin_search_tree_node_it_< Node, point_const_iterator, point_iterator, _Alloc > node_iterator
Definition: traits.hpp:139
Node for Red-Black trees.
Definition: node.hpp:52
__gnu_pbds::null_node_update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > * null_node_update_pointer
Definition: traits.hpp:235
types_traits< Key, null_type, _Alloc, false > type_traits
Definition: traits.hpp:178
Traits for abstract types.
Definition: types_traits.hpp:263
bin_search_tree_const_it_< typename _Alloc::template rebind< node >::other::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, false, _Alloc > const_reverse_iterator
Definition: traits.hpp:108