GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / include / c++ / 4.5.3 / ext / pb_ds / detail / left_child_next_sibling_heap_ / const_point_iterator.hpp
blob7d682526b4c44be3e9696be32e88b07348b2afa4
1 // -*- C++ -*-
3 // Copyright (C) 2005, 2006, 2009 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.
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.
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.
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/>.
25 // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
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.
36 /**
37 * @file const_point_iterator.hpp
38 * Contains an iterator class returned by the table's const find and insert
39 * methods.
42 #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP
43 #define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP
45 #include <ext/pb_ds/tag_and_trait.hpp>
46 #include <debug/debug.h>
48 namespace __gnu_pbds
50 namespace detail
53 #define PB_DS_CLASS_T_DEC \
54 template<typename Node, class Allocator>
56 #define PB_DS_CLASS_C_DEC \
57 left_child_next_sibling_heap_node_const_point_iterator_<Node, Allocator>
59 // Const point-type iterator.
60 template<typename Node, class Allocator>
61 class left_child_next_sibling_heap_node_const_point_iterator_
64 protected:
65 typedef typename Allocator::template rebind<Node>::other::pointer node_pointer;
67 public:
69 // Category.
70 typedef trivial_iterator_tag iterator_category;
72 // Difference type.
73 typedef trivial_iterator_difference_type difference_type;
75 // Iterator's value type.
76 typedef typename Node::value_type value_type;
78 // Iterator's pointer type.
79 typedef
80 typename Allocator::template rebind<
81 value_type>::other::pointer
82 pointer;
84 // Iterator's const pointer type.
85 typedef
86 typename Allocator::template rebind<
87 value_type>::other::const_pointer
88 const_pointer;
90 // Iterator's reference type.
91 typedef
92 typename Allocator::template rebind<
93 value_type>::other::reference
94 reference;
96 // Iterator's const reference type.
97 typedef
98 typename Allocator::template rebind<
99 value_type>::other::const_reference
100 const_reference;
102 public:
104 inline
105 left_child_next_sibling_heap_node_const_point_iterator_(node_pointer p_nd) : m_p_nd(p_nd)
108 // Default constructor.
109 inline
110 left_child_next_sibling_heap_node_const_point_iterator_() : m_p_nd(NULL)
113 // Copy constructor.
114 inline
115 left_child_next_sibling_heap_node_const_point_iterator_(const PB_DS_CLASS_C_DEC& other) : m_p_nd(other.m_p_nd)
118 // Access.
119 inline const_pointer
120 operator->() const
122 _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
123 return &m_p_nd->m_value;
126 // Access.
127 inline const_reference
128 operator*() const
130 _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
131 return m_p_nd->m_value;
134 // Compares content to a different iterator object.
135 inline bool
136 operator==(const PB_DS_CLASS_C_DEC& other) const
137 { return m_p_nd == other.m_p_nd; }
139 // Compares content (negatively) to a different iterator object.
140 inline bool
141 operator!=(const PB_DS_CLASS_C_DEC& other) const
142 { return m_p_nd != other.m_p_nd; }
144 public:
145 node_pointer m_p_nd;
148 #undef PB_DS_CLASS_T_DEC
149 #undef PB_DS_CLASS_C_DEC
151 } // namespace detail
152 } // namespace __gnu_pbds
154 #endif