| Home | Libraries | People | FAQ | More

## Struct template bucket_plus_vtraits

boost::intrusive::bucket_plus_vtraits

## Synopsis

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

    template<typename ValueTraits, typename BucketTraits, bool LinearBuckets>
    struct bucket_plus_vtraits {
      // types
      typedef BucketTraits                                                                                               bucket_traits;
      typedef ValueTraits                                                                                                value_traits;
      typedef unordered_bucket_impl< value_traits >::type                                                                bucket_type;
      typedef unordered_bucket_ptr_impl< value_traits >::type                                                            bucket_ptr;
      typedef value_traits::node_traits                                                                                  node_traits;
      typedef bucket_type::node_traits                                                                                   slist_node_traits;
      typedef unordered_group_adapter< node_traits >                                                                     group_traits;
      typedef group_functions< node_traits >                                                                             group_functions_t;
      typedef unspecified                                                                                                slist_node_algorithms;
      typedef slist_node_traits::node_ptr                                                                                slist_node_ptr;
      typedef trivial_value_traits< slist_node_traits, normal_link >                                                     slist_value_traits;
      typedef slist_iterator< slist_value_traits, false >                                                                siterator;
      typedef slist_iterator< slist_value_traits, true >                                                                 const_siterator;
      typedef node_traits::node_ptr                                                                                      node_ptr;
      typedef node_traits::const_node_ptr                                                                                const_node_ptr;
      typedef node_traits::node                                                                                          node;
      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 circular_slist_algorithms< group_traits >                                                                  group_algorithms;
      typedef pointer_traits< typenamevalue_traits::pointer >::template rebind_pointer< constvalue_traits >::type        const_value_traits_ptr;
      typedef pointer_traits< typenamevalue_traits::pointer >::template rebind_pointer< constbucket_plus_vtraits >::type const_bucket_value_traits_ptr;
      typedef unspecified                                                                                                linear_buckets_t;
      typedef bucket_plus_vtraits &                                                                                      this_ref;
      typedef hashtable_iterator< bucket_plus_vtraits, LinearBuckets, false >                                            iterator;
      typedef hashtable_iterator< bucket_plus_vtraits, LinearBuckets, true >                                             const_iterator;

      // member classes/structs/unions

      struct data_type : public ValueTraits, public BucketTraits {

        // public member functions
        data_type(const ValueTraits &, const BucketTraits &);
        data_type(data_type &&);
      };
      template<typename Disposer>
      struct typeof_node_disposer {
        // types
        typedef unspecified type;
      };

      // public member functions
      bucket_plus_vtraits(const ValueTraits &, const bucket_traits &);
      bucket_plus_vtraits(bucket_plus_vtraits &&);
      const_value_traits_ptr priv_value_traits_ptr() const;
      const bucket_plus_vtraits & get_bucket_value_traits() const;
      bucket_plus_vtraits & get_bucket_value_traits();
      const_bucket_value_traits_ptr bucket_value_traits_ptr() const;
      const value_traits & priv_value_traits() const;
      value_traits & priv_value_traits();
      const bucket_traits & priv_bucket_traits() const;
      bucket_traits & priv_bucket_traits();
      bucket_ptr priv_bucket_pointer() const noexcept;
      std::size_t priv_usable_bucket_count() const noexcept;
      bucket_type & priv_bucket(std::size_t) const noexcept;
      bucket_ptr priv_bucket_ptr(std::size_t) const noexcept;
      bucket_ptr priv_past_usable_bucket_ptr() const;
      bucket_ptr priv_invalid_bucket_ptr() const;
      void priv_set_sentinel_bucket() const;
      void priv_unset_sentinel_bucket() const;
      siterator priv_end_sit() const;
      siterator priv_end_sit(unspecified) const;
      siterator priv_end_sit(unspecified) const;
      siterator priv_bucket_lbegin(std::size_t) const;
      siterator priv_bucket_lbbegin(std::size_t) const;
      siterator priv_bucket_lend(std::size_t) const;
      std::size_t priv_bucket_size(std::size_t) const;
      bool priv_bucket_empty(std::size_t) const;
      bool priv_bucket_empty(bucket_ptr) const;
      template<typename NodeDisposer, bool OptimizeMultikey>
        std::size_t priv_erase_node_range(siterator const &, std::size_t const,
                                          siterator const &, std::size_t const,
                                          NodeDisposer, unspecified);
      template<typename Disposer>
        typeof_node_disposer< Disposer >::type
        make_node_disposer(const Disposer &) const;
      node & priv_value_to_node(reference);
      const node & priv_value_to_node(const_reference) const;
      node_ptr priv_value_to_node_ptr(reference);
      const_node_ptr priv_value_to_node_ptr(const_reference) const;
      reference priv_value_from_siterator(siterator);
      const_reference priv_value_from_siterator(siterator) const;
      void priv_clear_buckets(const bucket_ptr, const std::size_t);
      std::size_t priv_stored_or_compute_hash(const value_type &, unspecified) const;
      iterator end() noexcept;
      const_iterator end() const noexcept;
      const_iterator cend() const noexcept;
      iterator build_iterator(siterator, bucket_ptr);
      iterator build_iterator(siterator, bucket_ptr, unspecified);
      iterator build_iterator(siterator, bucket_ptr, unspecified);
      const_iterator build_const_iterator(siterator, bucket_ptr) const;
      const_iterator
      build_const_iterator(siterator, bucket_ptr, unspecified) const;
      const_iterator
      build_const_iterator(siterator, bucket_ptr, unspecified) const;

      // public static functions
      static siterator priv_bucket_lbegin(bucket_type &);
      static siterator priv_bucket_lbbegin(bucket_type &);
      static siterator priv_bucket_lend(bucket_type &);
      static std::size_t priv_bucket_size(const bucket_type &);
      static bool priv_bucket_empty(const bucket_type &);
      template<typename NodeDisposer>
        static std::size_t
        priv_erase_from_single_bucket(bucket_type &, siterator, siterator,
                                      NodeDisposer, unspecified);
      template<typename NodeDisposer>
        static std::size_t
        priv_erase_from_single_bucket(bucket_type &, siterator, siterator,
                                      NodeDisposer, unspecified);
      template<typename NodeDisposer>
        static void priv_erase_node(bucket_type &, siterator, NodeDisposer,
                                    unspecified);
      template<typename NodeDisposer>
        static void priv_erase_node(bucket_type &, siterator, NodeDisposer,
                                    unspecified);
      static siterator priv_get_last(bucket_type &, unspecified);
      static siterator priv_get_last(bucket_type &, unspecified);
      template<typename NodeDisposer>
        static std::size_t priv_erase_whole_bucket(bucket_type &, NodeDisposer);
      static siterator priv_get_previous(bucket_type &, siterator, unspecified);
      static siterator priv_get_previous(bucket_type &, siterator, unspecified);
      static bucket_ptr to_ptr(bucket_type &);
      static siterator sit_bbegin(bucket_type &);
      static siterator sit_begin(bucket_type &);
      static siterator sit_end(bucket_type &);
      static std::size_t priv_stored_hash(siterator, unspecified);
      static std::size_t priv_stored_hash(siterator, unspecified);
      static void priv_init_buckets(const bucket_ptr, const std::size_t);

      // public data members
      static const bool safemode_or_autounlink;
      static const std::size_t bucket_overhead;
    };

## Description

### `bucket_plus_vtraits` public member functions

1.     bucket_plus_vtraits(const ValueTraits & val_traits,
                           const bucket_traits & b_traits);

2.     bucket_plus_vtraits(bucket_plus_vtraits && other);

3.     const_value_traits_ptr priv_value_traits_ptr() const;

4.     const bucket_plus_vtraits & get_bucket_value_traits() const;

5.     bucket_plus_vtraits & get_bucket_value_traits();

6.     const_bucket_value_traits_ptr bucket_value_traits_ptr() const;

7.     const value_traits & priv_value_traits() const;

8.     value_traits & priv_value_traits();

9.     const bucket_traits & priv_bucket_traits() const;

10.     bucket_traits & priv_bucket_traits();

11.     bucket_ptr priv_bucket_pointer() const noexcept;

12.     std::size_t priv_usable_bucket_count() const noexcept;

13.     bucket_type & priv_bucket(std::size_t n) const noexcept;

14.     bucket_ptr priv_bucket_ptr(std::size_t n) const noexcept;

15.     bucket_ptr priv_past_usable_bucket_ptr() const;

16.     bucket_ptr priv_invalid_bucket_ptr() const;

17.     void priv_set_sentinel_bucket() const;

18.     void priv_unset_sentinel_bucket() const;

19.     siterator priv_end_sit() const;

20.     siterator priv_end_sit(unspecified) const;

21.     siterator priv_end_sit(unspecified) const;

22.     siterator priv_bucket_lbegin(std::size_t n) const;

23.     siterator priv_bucket_lbbegin(std::size_t n) const;

24.     siterator priv_bucket_lend(std::size_t n) const;

25.     std::size_t priv_bucket_size(std::size_t n) const;

26.     bool priv_bucket_empty(std::size_t n) const;

27.     bool priv_bucket_empty(bucket_ptr p) const;

28.     template<typename NodeDisposer, bool OptimizeMultikey>
          std::size_t priv_erase_node_range(siterator const & before_first_it,
                                            std::size_t const first_bucket,
                                            siterator const & last_it,
                                            std::size_t const last_bucket,
                                            NodeDisposer node_disposer,
                                            unspecified optimize_multikey_tag);

29.     template<typename Disposer>
          typeof_node_disposer< Disposer >::type
          make_node_disposer(const Disposer & disposer) const;

30.     node & priv_value_to_node(reference v);

31.     const node & priv_value_to_node(const_reference v) const;

32.     node_ptr priv_value_to_node_ptr(reference v);

33.     const_node_ptr priv_value_to_node_ptr(const_reference v) const;

34.     reference priv_value_from_siterator(siterator s);

35.     const_reference priv_value_from_siterator(siterator s) const;

36.     void priv_clear_buckets(const bucket_ptr buckets_ptr,
                                const std::size_t bucket_cnt);

37.     std::size_t priv_stored_or_compute_hash(const value_type & v, unspecified) const;

38.     iterator end() noexcept;

39.     const_iterator end() const noexcept;

40.     const_iterator cend() const noexcept;

41.     iterator build_iterator(siterator s, bucket_ptr p);

42.     iterator build_iterator(siterator s, bucket_ptr p, unspecified);

43.     iterator build_iterator(siterator s, bucket_ptr, unspecified);

    linear buckets

44.     const_iterator build_const_iterator(siterator s, bucket_ptr p) const;

45.     const_iterator
        build_const_iterator(siterator s, bucket_ptr p, unspecified) const;

46.     const_iterator
        build_const_iterator(siterator s, bucket_ptr, unspecified) const;

    linear buckets

### `bucket_plus_vtraits` public static functions

1.     static siterator priv_bucket_lbegin(bucket_type & b);

2.     static siterator priv_bucket_lbbegin(bucket_type & b);

3.     static siterator priv_bucket_lend(bucket_type & b);

4.     static std::size_t priv_bucket_size(const bucket_type & b);

5.     static bool priv_bucket_empty(const bucket_type & b);

6.     template<typename NodeDisposer>
         static std::size_t
         priv_erase_from_single_bucket(bucket_type & b, siterator sbefore_first,
                                       siterator slast, NodeDisposer node_disposer,
                                       unspecified);

7.     template<typename NodeDisposer>
         static std::size_t
         priv_erase_from_single_bucket(bucket_type &, siterator sbefore_first,
                                       siterator slast, NodeDisposer node_disposer,
                                       unspecified);

8.     template<typename NodeDisposer>
         static void priv_erase_node(bucket_type & b, siterator i,
                                     NodeDisposer node_disposer, unspecified);

9.     template<typename NodeDisposer>
         static void priv_erase_node(bucket_type & b, siterator i,
                                     NodeDisposer node_disposer, unspecified);

   optimize multikey

10.     static siterator priv_get_last(bucket_type & b, unspecified);

11.     static siterator priv_get_last(bucket_type & b, unspecified);

12.     template<typename NodeDisposer>
          static std::size_t
          priv_erase_whole_bucket(bucket_type & b, NodeDisposer node_disposer);

13.     static siterator priv_get_previous(bucket_type & b, siterator i, unspecified);

14.     static siterator priv_get_previous(bucket_type & b, siterator i, unspecified);

15.     static bucket_ptr to_ptr(bucket_type & b);

16.     static siterator sit_bbegin(bucket_type & b);

17.     static siterator sit_begin(bucket_type & b);

18.     static siterator sit_end(bucket_type & b);

19.     static std::size_t priv_stored_hash(siterator s, unspecified);

20.     static std::size_t priv_stored_hash(siterator, unspecified);

21.     static void priv_init_buckets(const bucket_ptr buckets_ptr,
                                      const std::size_t bucket_cnt);