link_mode.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2006-2013
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/intrusive for documentation.
  10. //
  11. /////////////////////////////////////////////////////////////////////////////
  12. #ifndef BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP
  13. #define BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP
  14. namespace boost {
  15. namespace intrusive {
  16. //!This enumeration defines the type of value_traits that can be defined
  17. //!for Boost.Intrusive containers
  18. enum link_mode_type{
  19. //!If this linking policy is specified in a value_traits class
  20. //!as the link_mode, containers
  21. //!configured with such value_traits won't set the hooks
  22. //!of the erased values to a default state. Containers also won't
  23. //!check that the hooks of the new values are default initialized.
  24. normal_link,
  25. //!If this linking policy is specified in a value_traits class
  26. //!as the link_mode, containers
  27. //!configured with such value_traits will set the hooks
  28. //!of the erased values to a default state. Containers also will
  29. //!check that the hooks of the new values are default initialized.
  30. safe_link,
  31. //!Same as "safe_link" but the user type is an auto-unlink
  32. //!type, so the containers with constant-time size features won't be
  33. //!compatible with value_traits configured with this policy.
  34. //!Containers also know that the a value can be silently erased from
  35. //!the container without using any function provided by the containers.
  36. auto_unlink
  37. };
  38. } //namespace intrusive
  39. } //namespace boost
  40. #endif //BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP