Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Struct template hashdata_internal

boost::intrusive::hashdata_internal

Synopsis

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

template<typename ValueTraits, typename VoidOrKeyOfValue, 
         typename VoidOrKeyHash, typename VoidOrKeyEqual, 
         typename BucketTraits, typename SizeType, std::size_t BoolFlags> 
struct hashdata_internal : public boost::intrusive::hashtable_size_wrapper< ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags >
{
  // types
  typedef get_hashtable_size_wrapper_bucket< ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags >::type internal_type;         
  typedef internal_type::key_equal                                                                                                                   key_equal;             
  typedef internal_type::hasher                                                                                                                      hasher;                
  typedef bucket_plus_vtraits< ValueTraits, BucketTraits, linear_buckets >                                                                           bucket_plus_vtraits_t; 
  typedef SizeType                                                                                                                                   size_type;             
  typedef internal_type::size_traits                                                                                                                 split_traits;          
  typedef bucket_plus_vtraits_t::bucket_ptr                                                                                                          bucket_ptr;            
  typedef bucket_plus_vtraits_t::const_value_traits_ptr                                                                                              const_value_traits_ptr;
  typedef bucket_plus_vtraits_t::siterator                                                                                                           siterator;             
  typedef bucket_plus_vtraits_t::bucket_traits                                                                                                       bucket_traits;         
  typedef bucket_plus_vtraits_t::value_traits                                                                                                        value_traits;          
  typedef bucket_plus_vtraits_t::bucket_type                                                                                                         bucket_type;           
  typedef value_traits::value_type                                                                                                                   value_type;            
  typedef value_traits::pointer                                                                                                                      pointer;               
  typedef value_traits::const_pointer                                                                                                                const_pointer;         
  typedef pointer_traits< pointer >::reference                                                                                                       reference;             
  typedef pointer_traits< const_pointer >::reference                                                                                                 const_reference;       
  typedef value_traits::node_traits                                                                                                                  node_traits;           
  typedef node_traits::node                                                                                                                          node;                  
  typedef node_traits::node_ptr                                                                                                                      node_ptr;              
  typedef node_traits::const_node_ptr                                                                                                                const_node_ptr;        
  typedef bucket_plus_vtraits_t::slist_node_algorithms                                                                                               slist_node_algorithms; 
  typedef bucket_plus_vtraits_t::slist_node_ptr                                                                                                      slist_node_ptr;        
  typedef hash_key_types_base< typename ValueTraits::value_type, VoidOrKeyOfValue >                                                                  hash_types_base;       
  typedef hash_types_base::key_of_value                                                                                                              key_of_value;          
  typedef unspecified                                                                                                                                store_hash_t;          
  typedef unspecified                                                                                                                                local_iterator;        
  typedef unspecified                                                                                                                                const_local_iterator;  
  typedef unspecified                                                                                                                                linear_buckets_t;      
  typedef bucket_plus_vtraits_t::iterator                                                                                                            iterator;              
  typedef bucket_plus_vtraits_t::const_iterator                                                                                                      const_iterator;        
  typedef unspecified                                                                                                                                fastmod_buckets_t;     

  // construct/copy/destruct
  hashdata_internal(const ValueTraits &, const bucket_traits &, 
                    const hasher &, const key_equal &);
  hashdata_internal(hashdata_internal &&);
  ~hashdata_internal();

  // public member functions
  internal_type::size_traits_t priv_split_traits();
  internal_type::size_traits_const_t priv_split_traits() const;
  void priv_clear_buckets();
  void priv_clear_buckets_and_cache();
  void priv_init_buckets_and_cache();
  SizeType split_count() const noexcept;
  iterator iterator_to(reference) noexcept(!linear_buckets));
  const_iterator iterator_to(const_reference) const noexcept(!linear_buckets));
  iterator iterator_to(reference, unspecified);
  const_iterator iterator_to(const_reference, unspecified) const;
  bucket_type & priv_hash_to_bucket(std::size_t) const;
  bucket_ptr priv_hash_to_bucket_ptr(std::size_t) const;
  size_type priv_hash_to_nbucket(std::size_t) const;
  size_type priv_hash_to_nbucket(std::size_t, unspecified) const;
  size_type priv_hash_to_nbucket(std::size_t, unspecified) const;
  iterator iterator_to(reference, unspecified) noexcept;
  const_iterator iterator_to(const_reference, unspecified) const noexcept;
  local_iterator local_iterator_to(reference) noexcept;
  const_local_iterator local_iterator_to(const_reference) const noexcept;
  size_type bucket_count() const noexcept;
  size_type bucket_size(size_type) const noexcept;
  bucket_ptr bucket_pointer() const noexcept;
  local_iterator begin(size_type) noexcept;
  const_local_iterator begin(size_type) const noexcept;
  const_local_iterator cbegin(size_type) const noexcept;
  local_iterator end(size_type) noexcept;
  const_local_iterator end(size_type) const noexcept;
  const_local_iterator cend(size_type) const noexcept;
  iterator begin() noexcept;
  const_iterator begin() const noexcept;
  const_iterator cbegin() const noexcept;
  hasher hash_function() const;
  key_equal key_eq() const;

  // public static functions
  static SizeType initial_split_from_bucket_count(SizeType) noexcept;
  static SizeType rehash_split_from_bucket_count(SizeType) noexcept;
  static local_iterator s_local_iterator_to(reference) noexcept;
  static const_local_iterator s_local_iterator_to(const_reference) noexcept;
  static size_type suggested_upper_bucket_count(size_type) noexcept;
  static size_type suggested_lower_bucket_count(size_type) noexcept;

  // public data members
  static const bool linear_buckets;
  static const bool store_hash;
  static const bool safemode_or_autounlink;
  static const bool stateful_value_traits;
  static const bool incremental;
  static const bool power_2_buckets;
  static const bool fastmod_buckets;
};

Description

hashdata_internal public construct/copy/destruct

  1. hashdata_internal(const ValueTraits & val_traits, 
                      const bucket_traits & b_traits, const hasher & h, 
                      const key_equal & e);
  2. hashdata_internal(hashdata_internal && other);
  3. ~hashdata_internal();

hashdata_internal public member functions

  1. internal_type::size_traits_t priv_split_traits();
  2. internal_type::size_traits_const_t priv_split_traits() const;
  3. void priv_clear_buckets();
  4. void priv_clear_buckets_and_cache();
  5. void priv_init_buckets_and_cache();
  6. SizeType split_count() const noexcept;
  7. iterator iterator_to(reference value) noexcept(!linear_buckets));
  8. const_iterator 
    iterator_to(const_reference value) const noexcept(!linear_buckets));
  9. iterator iterator_to(reference value, unspecified);
  10. const_iterator iterator_to(const_reference value, unspecified) const;
  11. bucket_type & priv_hash_to_bucket(std::size_t hash_value) const;
  12. bucket_ptr priv_hash_to_bucket_ptr(std::size_t hash_value) const;
  13. size_type priv_hash_to_nbucket(std::size_t hash_value) const;
  14. size_type priv_hash_to_nbucket(std::size_t hash_value, unspecified) const;
  15. size_type priv_hash_to_nbucket(std::size_t hash_value, unspecified) const;
    fastmod_buckets_t
  16. iterator iterator_to(reference value, unspecified) noexcept;
  17. const_iterator iterator_to(const_reference value, unspecified) const noexcept;
  18. local_iterator local_iterator_to(reference value) noexcept;
  19. const_local_iterator local_iterator_to(const_reference value) const noexcept;
  20. size_type bucket_count() const noexcept;
  21. size_type bucket_size(size_type n) const noexcept;
  22. bucket_ptr bucket_pointer() const noexcept;
  23. local_iterator begin(size_type n) noexcept;
  24. const_local_iterator begin(size_type n) const noexcept;
  25. const_local_iterator cbegin(size_type n) const noexcept;
  26. local_iterator end(size_type n) noexcept;
  27. const_local_iterator end(size_type n) const noexcept;
  28. const_local_iterator cend(size_type n) const noexcept;
  29. iterator begin() noexcept;
  30. const_iterator begin() const noexcept;
  31. const_iterator cbegin() const noexcept;
  32. hasher hash_function() const;
  33. key_equal key_eq() const;

hashdata_internal public static functions

  1. static SizeType initial_split_from_bucket_count(SizeType bc) noexcept;
  2. static SizeType rehash_split_from_bucket_count(SizeType bc) noexcept;
  3. static local_iterator s_local_iterator_to(reference value) noexcept;
  4. static const_local_iterator 
    s_local_iterator_to(const_reference value) noexcept;
  5. static size_type suggested_upper_bucket_count(size_type n) noexcept;
  6. static size_type suggested_lower_bucket_count(size_type n) noexcept;

PrevUpHomeNext