File indexing completed on 2025-01-18 09:38:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_INTRUSIVE_LIST_NODE_HPP
0015 #define BOOST_INTRUSIVE_LIST_NODE_HPP
0016
0017 #ifndef BOOST_CONFIG_HPP
0018 # include <boost/config.hpp>
0019 #endif
0020
0021 #if defined(BOOST_HAS_PRAGMA_ONCE)
0022 # pragma once
0023 #endif
0024
0025 #include <boost/intrusive/detail/workaround.hpp>
0026 #include <boost/intrusive/pointer_rebind.hpp>
0027
0028 namespace boost {
0029 namespace intrusive {
0030
0031
0032
0033
0034
0035 template<class VoidPointer>
0036 struct list_node
0037 {
0038 typedef typename pointer_rebind<VoidPointer, list_node>::type node_ptr;
0039 node_ptr next_;
0040 node_ptr prev_;
0041 };
0042
0043 template<class VoidPointer>
0044 struct list_node_traits
0045 {
0046 typedef list_node<VoidPointer> node;
0047 typedef typename node::node_ptr node_ptr;
0048 typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
0049
0050 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const_node_ptr n)
0051 { return n->prev_; }
0052
0053 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(node_ptr n)
0054 { return n->prev_; }
0055
0056 BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
0057 { n->prev_ = prev; }
0058
0059 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
0060 { return n->next_; }
0061
0062 BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(node_ptr n)
0063 { return n->next_; }
0064
0065 BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
0066 { n->next_ = next; }
0067 };
0068
0069 }
0070 }
0071
0072 #endif