Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template trivial_value_traits

boost::intrusive::trivial_value_traits

Synopsis

// In header: <boost/intrusive/trivial_value_traits.hpp>

template<typename NodeTraits, link_mode_type LinkMode = normal_link> 
struct trivial_value_traits {
  // types
  typedef NodeTraits                  node_traits;   
  typedef node_traits::node_ptr       node_ptr;      
  typedef node_traits::const_node_ptr const_node_ptr;
  typedef node_traits::node           value_type;    
  typedef node_ptr                    pointer;       
  typedef const_node_ptr              const_pointer; 

  // public static functions
  static node_ptr to_node_ptr(value_type &);
  static const_node_ptr to_node_ptr(const value_type &);
  static const pointer & to_value_ptr(const node_ptr &);
  static const const_pointer & to_value_ptr(const const_node_ptr &);

  // public data members
  static const link_mode_type link_mode;
};

Description

This value traits template is used to create value traits from user defined node traits where value_traits::value_type and node_traits::node should be equal

trivial_value_traits public static functions

  1. static node_ptr to_node_ptr(value_type & value);
  2. static const_node_ptr to_node_ptr(const value_type & value);
  3. static const pointer & to_value_ptr(const node_ptr & n);
  4. static const const_pointer & to_value_ptr(const const_node_ptr & n);

PrevUpHomeNext