Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::interprocess::map_index< MapConfig > Singleton Reference

Index type based in boost::interprocess::map. More...

#include <interprocess_fwd.hpp>

Inheritance diagram for boost::interprocess::map_index< MapConfig >:
Collaboration diagram for boost::interprocess::map_index< MapConfig >:

Public Types

typedef Key key_type
 
typedef
::boost::container::allocator_traits
< Allocator > 
allocator_traits_type
 
typedef T mapped_type
 
typedef std::pair< const Key, Tvalue_type
 
typedef
boost::container::allocator_traits
< Allocator >::pointer 
pointer
 
typedef
boost::container::allocator_traits
< Allocator >::const_pointer 
const_pointer
 
typedef
boost::container::allocator_traits
< Allocator >::reference 
reference
 
typedef
boost::container::allocator_traits
< Allocator >::const_reference 
const_reference
 
typedef
boost::container::allocator_traits
< Allocator >::size_type 
size_type
 
typedef
boost::container::allocator_traits
< Allocator >::difference_type 
difference_type
 
typedef Allocator allocator_type
 
typedef Compare key_compare
 
typedef std::pair< key_type,
mapped_type
nonconst_value_type
 

Public Member Functions

 map_index (segment_manager_base *segment_mngr)
 Constructor. More...
 
void reserve (typename segment_manager_base::size_type)
 This reserves memory to optimize the insertion of n elements in the index. More...
 
void shrink_to_fit ()
 This tries to free previously allocate unused memory. More...
 
typedef BOOST_CONTAINER_IMPDEF (base_t::stored_allocator_type) stored_allocator_type
 
typedef BOOST_CONTAINER_IMPDEF (value_compare_impl) value_compare
 
typedef BOOST_CONTAINER_IMPDEF (base_t::iterator) iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::const_iterator) const _iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::reverse_iterator) reverse_iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::const_reverse_iterator) const _reverse_iterator
 
typedef BOOST_CONTAINER_IMPDEF (movable_value_type_impl) movable_value_type
 
Tat (const key_type &k)
 Returns: Allocator reference to the element whose key is equivalent to x. More...
 
const Tat (const key_type &k) const
 Returns: Allocator reference to the element whose key is equivalent to x. More...
 
std::pair< iterator, bool > insert (const value_type &x)
 Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x. More...
 
std::pair< iterator, bool > insert (const nonconst_value_type &x)
 Effects: Inserts a new value_type created from the pair if and only if there is no element in the container with key equivalent to the key of x. More...
 
std::pair< iterator, bool > insert (BOOST_RV_REF(nonconst_value_type) x)
 Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x. More...
 
std::pair< iterator, bool > insert (BOOST_RV_REF(movable_value_type) x)
 Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x. More...
 
std::pair< iterator, bool > insert (BOOST_RV_REF(value_type) x)
 Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x. More...
 
iterator insert (const_iterator p, const value_type &x)
 Effects: Inserts a copy of x in the container if and only if there is no element in the container with key equivalent to the key of x. More...
 
iterator insert (const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
 Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x. More...
 
iterator insert (const_iterator p, BOOST_RV_REF(movable_value_type) x)
 Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x. More...
 
iterator insert (const_iterator p, const nonconst_value_type &x)
 Effects: Inserts a copy of x in the container. More...
 
iterator insert (const_iterator p, BOOST_RV_REF(value_type) x)
 Effects: Inserts an element move constructed from x in the container. More...
 
template<class InputIterator >
void insert (InputIterator first, InputIterator last)
 Requires: first, last are not iterators into *this. More...
 
void insert (std::initializer_list< value_type > il)
 Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element. More...
 
size_type count (const key_type &x) const
 Returns: The number of elements with key equivalent to x. More...
 

Detailed Description

template<class MapConfig>
singleton boost::interprocess::map_index< MapConfig >

Index type based in boost::interprocess::map.

Just derives from boost::interprocess::map and defines the interface needed by managed memory segments

Member Typedef Documentation

template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef ::boost::container::allocator_traits<Allocator> boost::container::map< Key, T, Compare, Allocator, MapOptions >::allocator_traits_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef Allocator boost::container::map< Key, T, Compare, Allocator, MapOptions >::allocator_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::const_pointer boost::container::map< Key, T, Compare, Allocator, MapOptions >::const_pointer
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::const_reference boost::container::map< Key, T, Compare, Allocator, MapOptions >::const_reference
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::difference_type boost::container::map< Key, T, Compare, Allocator, MapOptions >::difference_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef Compare boost::container::map< Key, T, Compare, Allocator, MapOptions >::key_compare
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef Key boost::container::map< Key, T, Compare, Allocator, MapOptions >::key_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef T boost::container::map< Key, T, Compare, Allocator, MapOptions >::mapped_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef std::pair<key_type, mapped_type> boost::container::map< Key, T, Compare, Allocator, MapOptions >::nonconst_value_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::pointer boost::container::map< Key, T, Compare, Allocator, MapOptions >::pointer
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::reference boost::container::map< Key, T, Compare, Allocator, MapOptions >::reference
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::allocator_traits<Allocator>::size_type boost::container::map< Key, T, Compare, Allocator, MapOptions >::size_type
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef std::pair<const Key, T> boost::container::map< Key, T, Compare, Allocator, MapOptions >::value_type
inherited

Constructor & Destructor Documentation

template<class MapConfig >
boost::interprocess::map_index< MapConfig >::map_index ( segment_manager_base *  segment_mngr)
inline

Constructor.

Takes a pointer to the segment manager. Can throw

Member Function Documentation

template<class Key, class T, class Compare, class Allocator , class MapOptions >
T& boost::container::map< Key, T, Compare, Allocator, MapOptions >::at ( const key_type k)
inlineinherited

Returns: Allocator reference to the element whose key is equivalent to x.

Throws: An exception object of type out_of_range if no such element is present. Complexity: logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
const T& boost::container::map< Key, T, Compare, Allocator, MapOptions >::at ( const key_type k) const
inlineinherited

Returns: Allocator reference to the element whose key is equivalent to x.

Throws: An exception object of type out_of_range if no such element is present. Complexity: logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::stored_allocator_type  )
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( value_compare_impl  )
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::iterator  )
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::const_iterator  ) const
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::reverse_iterator  )
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::const_reverse_iterator  ) const
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
typedef boost::container::map< Key, T, Compare, Allocator, MapOptions >::BOOST_CONTAINER_IMPDEF ( movable_value_type_impl  )
inherited
template<class Key, class T, class Compare, class Allocator , class MapOptions >
size_type boost::container::map< Key, T, Compare, Allocator, MapOptions >::count ( const key_type x) const
inlineinherited

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

template<class Key, class T, class Compare, class Allocator , class MapOptions >
std::pair<iterator,bool> boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const value_type x)
inlineinherited

Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x.

Returns: The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
std::pair<iterator,bool> boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const nonconst_value_type x)
inlineinherited

Effects: Inserts a new value_type created from the pair if and only if there is no element in the container with key equivalent to the key of x.

Returns: The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
std::pair<iterator,bool> boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( BOOST_RV_REF(nonconst_value_type x)
inlineinherited

Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.

Returns: The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
std::pair<iterator,bool> boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( BOOST_RV_REF(movable_value_type)  x)
inlineinherited

Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.

Returns: The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
std::pair<iterator,bool> boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( BOOST_RV_REF(value_type x)
inlineinherited

Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x.

Returns: The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
iterator boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const_iterator  p,
const value_type x 
)
inlineinherited

Effects: Inserts a copy of x in the container if and only if there is no element in the container with key equivalent to the key of x.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
iterator boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const_iterator  p,
BOOST_RV_REF(nonconst_value_type x 
)
inlineinherited

Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
iterator boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const_iterator  p,
BOOST_RV_REF(movable_value_type)  x 
)
inlineinherited

Effects: Move constructs a new value from x if and only if there is no element in the container with key equivalent to the key of x.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
iterator boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const_iterator  p,
const nonconst_value_type x 
)
inlineinherited

Effects: Inserts a copy of x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
iterator boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( const_iterator  p,
BOOST_RV_REF(value_type x 
)
inlineinherited

Effects: Inserts an element move constructed from x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic.

template<class Key, class T, class Compare, class Allocator , class MapOptions >
template<class InputIterator >
void boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( InputIterator  first,
InputIterator  last 
)
inlineinherited

Requires: first, last are not iterators into *this.

Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element.

Complexity: At most N log(size()+N) (N is the distance from first to last)

template<class Key, class T, class Compare, class Allocator , class MapOptions >
void boost::container::map< Key, T, Compare, Allocator, MapOptions >::insert ( std::initializer_list< value_type il)
inlineinherited

Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element.

Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end())

template<class MapConfig >
void boost::interprocess::map_index< MapConfig >::reserve ( typename segment_manager_base::size_type  )
inline

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

template<class MapConfig >
void boost::interprocess::map_index< MapConfig >::shrink_to_fit ( )
inline

This tries to free previously allocate unused memory.


The documentation for this singleton was generated from the following file: