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_OV_TREE_NODE_AND_IT_TRAITS_HPP
42 #define PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
43 
45 
46 namespace __gnu_pbds
47 {
48  namespace detail
49  {
52  template<typename Key,
53  typename Mapped,
54  class Cmp_Fn,
55  template<typename Node_CItr,
56  class Node_Itr,
57  class Cmp_Fn_,
58  typename _Alloc_>
59  class Node_Update,
60  typename _Alloc>
61  struct tree_traits<
62  Key,
63  Mapped,
64  Cmp_Fn,
65  Node_Update,
67  _Alloc>
68  {
69  private:
70  typedef
71  typename types_traits<
72  Key,
73  Mapped,
74  _Alloc,
75  false>::value_type
77 
78  public:
79  typedef
81  Key,
82  Mapped,
83  Cmp_Fn,
84  Node_Update,
85  _Alloc>::type
87 
90  typedef
92  value_type,
94  _Alloc>
96 
97  typedef
99  value_type,
101  _Alloc>
103 
104  typedef
105  Node_Update<
108  Cmp_Fn,
109  _Alloc>
111 
112  typedef
116  Cmp_Fn,
117  _Alloc>*
119  };
120 
121 
124  template<typename Key,
125  class Cmp_Fn,
126  template<typename Node_CItr,
127  class Node_Itr,
128  class Cmp_Fn_,
129  typename _Alloc_>
130  class Node_Update,
131  typename _Alloc>
132  struct tree_traits<
133  Key,
134  null_type,
135  Cmp_Fn,
136  Node_Update,
137  ov_tree_tag,
138  _Alloc>
139  {
140  private:
141  typedef
142  typename types_traits<
143  Key,
144  null_type,
145  _Alloc,
146  false>::value_type
148 
149  public:
150  typedef
152  Key,
153  null_type,
154  Cmp_Fn,
155  Node_Update,
156  _Alloc>::type
158 
161  typedef
163  value_type,
165  _Alloc>
167 
169 
170  typedef
171  Node_Update<
174  Cmp_Fn,
175  _Alloc>
177 
178  typedef
182  Cmp_Fn,
183  _Alloc>*
185  };
186  } // namespace detail
187 } // namespace __gnu_pbds
188 
189 #endif // #ifndef PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
190 
Node_Update< node_const_iterator, node_const_iterator, Cmp_Fn, _Alloc > node_update
Definition: traits.hpp:176
tree_node_metadata_dispatch< Key, null_type, Cmp_Fn, Node_Update, _Alloc >::type metadata_type
Definition: traits.hpp:157
A null node updator, indicating that no node updates are required.
Definition: tag_and_trait.hpp:214
Node_Update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > node_update
Definition: traits.hpp:110
Represents no type, or absence of type, for template tricks.
Definition: tag_and_trait.hpp:210
ov_tree_node_it_< value_type, metadata_type, _Alloc > node_iterator
Definition: traits.hpp:102
Tree traits class, primary template.
Definition: traits.hpp:70
Const node reference.
Definition: node_iterators.hpp:57
ov_tree_node_const_it_< value_type, metadata_type, _Alloc > node_const_iterator
Definition: traits.hpp:95
__gnu_pbds::null_node_update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > * null_node_update_pointer
Definition: traits.hpp:184
types_traits< Key, null_type, _Alloc, false >::value_type value_type
Definition: traits.hpp:147
Ordered-vector tree.
Definition: tag_and_trait.hpp:159
types_traits< Key, Mapped, _Alloc, false >::value_type value_type
Definition: traits.hpp:76
Node reference.
Definition: node_iterators.hpp:204
__gnu_pbds::null_node_update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > * null_node_update_pointer
Definition: traits.hpp:118
Tree node metadata dispatch.
Definition: node_metadata_selector.hpp:84
Traits for abstract types.
Definition: types_traits.hpp:263
ov_tree_node_const_it_< value_type, metadata_type, _Alloc > node_const_iterator
Definition: traits.hpp:166
tree_node_metadata_dispatch< Key, Mapped, Cmp_Fn, Node_Update, _Alloc >::type metadata_type
Definition: traits.hpp:86