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

This is the documentation for a snapshot of the master branch, built from commit 67eb4ffa48.
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< DeriveFrom, SizeType, bool >
{
  // types
  typedef get_hashtable_size_wrapper_bucket< ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags >::type split_bucket_hash_equal_t;
  typedef split_bucket_hash_equal_t::key_equal                                                                                                       key_equal;                
  typedef split_bucket_hash_equal_t::hasher                                                                                                          hasher;                   
  typedef bucket_plus_vtraits< ValueTraits, BucketTraits, linear_buckets >                                                                           bucket_plus_vtraits_t;    
  typedef SizeType                                                                                                                                   size_type;                
  typedef split_bucket_hash_equal_t::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;        

  // public member functions
  hashdata_internal(const ValueTraits &, const bucket_traits &, 
                    const hasher &, const key_equal &);
  hashdata_internal(hashdata_internal &&);
  split_bucket_hash_equal_t::size_traits_t priv_split_traits();
  ~hashdata_internal();
  void priv_clear_buckets();
  void priv_clear_buckets_and_cache();
  void priv_init_buckets_and_cache();
  SizeType split_count() const noexcept;
  void split_count(SizeType) noexcept;
  void inc_split_count() noexcept;
  void dec_split_count() 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 member functions

  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. split_bucket_hash_equal_t::size_traits_t priv_split_traits();
  4. ~hashdata_internal();
  5. void priv_clear_buckets();
  6. void priv_clear_buckets_and_cache();
  7. void priv_init_buckets_and_cache();
  8. SizeType split_count() const noexcept;
  9. void split_count(SizeType s) noexcept;
  10. void inc_split_count() noexcept;
  11. void dec_split_count() noexcept;
  12. iterator iterator_to(reference value) noexcept(!linear_buckets);
  13. const_iterator 
    iterator_to(const_reference value) const noexcept(!linear_buckets);
  14. iterator iterator_to(reference value, unspecified);
  15. const_iterator iterator_to(const_reference value, unspecified) const;
  16. bucket_type & priv_hash_to_bucket(std::size_t hash_value) const;
  17. bucket_ptr priv_hash_to_bucket_ptr(std::size_t hash_value) const;
  18. size_type priv_hash_to_nbucket(std::size_t hash_value) const;
  19. size_type priv_hash_to_nbucket(std::size_t hash_value, unspecified) const;
  20. size_type priv_hash_to_nbucket(std::size_t hash_value, unspecified) const;
    fastmod_buckets_t
  21. iterator iterator_to(reference value, unspecified) noexcept;
  22. const_iterator iterator_to(const_reference value, unspecified) const noexcept;
  23. local_iterator local_iterator_to(reference value) noexcept;
  24. const_local_iterator local_iterator_to(const_reference value) const noexcept;
  25. size_type bucket_count() const noexcept;
  26. size_type bucket_size(size_type n) const noexcept;
  27. bucket_ptr bucket_pointer() const noexcept;
  28. local_iterator begin(size_type n) noexcept;
  29. const_local_iterator begin(size_type n) const noexcept;
  30. const_local_iterator cbegin(size_type n) const noexcept;
  31. local_iterator end(size_type n) noexcept;
  32. const_local_iterator end(size_type n) const noexcept;
  33. const_local_iterator cend(size_type n) const noexcept;
  34. iterator begin() noexcept;
  35. const_iterator begin() const noexcept;
  36. const_iterator cbegin() const noexcept;
  37. hasher hash_function() const;
  38. 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