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 for the latest Boost documentation.
PrevUpHomeNext

Class template iunordered_set_index

boost::interprocess::iunordered_set_index

Synopsis

// In header: <boost/interprocess/interprocess_fwd.hpp>

template<typename IndexConfig> 
class iunordered_set_index : private iunordered_set_index_aux::allocator_holder< MapConfig >,
                             public iunordered_set_index_aux::index_t< MapConfig >
{
public:
  // construct/copy/destruct
  iunordered_set_index(segment_manager_base *);
  ~iunordered_set_index();

  // public member functions
  void reserve(size_type);
  void shrink_to_fit();
  iterator find(const intrusive_compare_key_type &);
  const_iterator find(const intrusive_compare_key_type &) const;
  std::pair< iterator, bool > 
  insert_check(const intrusive_compare_key_type &, insert_commit_data &);
  iterator insert_commit(value_type &, insert_commit_data &);
};

Description

Index type based in boost::intrusive::set. Just derives from boost::intrusive::set and defines the interface needed by managed memory segments

iunordered_set_index public construct/copy/destruct

  1. iunordered_set_index(segment_manager_base * mngr);

    Constructor. Takes a pointer to the segment manager. Can throw

  2. ~iunordered_set_index();

iunordered_set_index public member functions

  1. void reserve(size_type new_n);

    This reserves memory to optimize the insertion of n elements in the index

  2. void shrink_to_fit();

    This tries to free unused memory previously allocated.

  3. iterator find(const intrusive_compare_key_type & key);
  4. const_iterator find(const intrusive_compare_key_type & key) const;
  5. std::pair< iterator, bool > 
    insert_check(const intrusive_compare_key_type & key, 
                 insert_commit_data & commit_data);
  6. iterator insert_commit(value_type & val, insert_commit_data & commit_data);

PrevUpHomeNext