Chris@16: ///////////////////////////////////////////////////////////////////////////// Chris@16: // Chris@16: // (C) Copyright Ion Gaztanaga 2006-2013 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/intrusive for documentation. Chris@16: // Chris@16: ///////////////////////////////////////////////////////////////////////////// Chris@16: Chris@101: #ifndef BOOST_INTRUSIVE_LINK_MODE_HPP Chris@101: #define BOOST_INTRUSIVE_LINK_MODE_HPP Chris@101: Chris@101: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@101: # pragma once Chris@101: #endif Chris@16: Chris@16: namespace boost { Chris@16: namespace intrusive { Chris@16: Chris@16: //!This enumeration defines the type of value_traits that can be defined Chris@16: //!for Boost.Intrusive containers Chris@16: enum link_mode_type{ Chris@16: //!If this linking policy is specified in a value_traits class Chris@16: //!as the link_mode, containers Chris@16: //!configured with such value_traits won't set the hooks Chris@16: //!of the erased values to a default state. Containers also won't Chris@16: //!check that the hooks of the new values are default initialized. Chris@16: normal_link, Chris@16: Chris@16: //!If this linking policy is specified in a value_traits class Chris@16: //!as the link_mode, containers Chris@16: //!configured with such value_traits will set the hooks Chris@16: //!of the erased values to a default state. Containers also will Chris@16: //!check that the hooks of the new values are default initialized. Chris@16: safe_link, Chris@16: Chris@16: //!Same as "safe_link" but the user type is an auto-unlink Chris@16: //!type, so the containers with constant-time size features won't be Chris@16: //!compatible with value_traits configured with this policy. Chris@16: //!Containers also know that the a value can be silently erased from Chris@16: //!the container without using any function provided by the containers. Chris@16: auto_unlink Chris@16: }; Chris@101: Chris@101: #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED Chris@101: Chris@101: template Chris@101: struct is_safe_autounlink Chris@101: { Chris@101: static const bool value = Chris@101: (int)link_mode == (int)auto_unlink || Chris@101: (int)link_mode == (int)safe_link; Chris@101: }; Chris@101: Chris@101: #endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED Chris@101: Chris@16: } //namespace intrusive Chris@16: } //namespace boost Chris@16: Chris@101: #endif //BOOST_INTRUSIVE_LINK_MODE_HPP