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 an old version of Boost. Click here to view this page for the latest version.
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;        

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

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