Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType > Class Template Reference

A basic heap memory named object creation class. More...

#include <managed_heap_memory.hpp>

Inheritance diagram for boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >:
Collaboration diagram for boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >:

Public Types

typedef base_t::size_type size_type
 

Public Member Functions

 basic_managed_heap_memory ()
 Default constructor. More...
 
 ~basic_managed_heap_memory ()
 Destructor. More...
 
 basic_managed_heap_memory (size_type size)
 Creates heap memory and initializes the segment manager. More...
 
 basic_managed_heap_memory (BOOST_RV_REF(basic_managed_heap_memory) moved)
 Moves the ownership of "moved"'s managed memory to *this. Does not throw. More...
 
basic_managed_heap_memoryoperator= (BOOST_RV_REF(basic_managed_heap_memory) moved)
 Moves the ownership of "moved"'s managed memory to *this. Does not throw. More...
 
bool grow (size_type extra_bytes)
 Tries to resize internal heap memory so that we have room for more objects. More...
 
void swap (basic_managed_heap_memory &other)
 Swaps the ownership of the managed heap memories managed by *this and other. More...
 

Detailed Description

template<class CharType, class AllocationAlgorithm, template< class IndexConfig > class IndexType>
class boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >

A basic heap memory named object creation class.

Initializes the heap memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>

Member Typedef Documentation

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
typedef base_t::size_type boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::size_type

Constructor & Destructor Documentation

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::basic_managed_heap_memory ( )
inline

Default constructor.

Does nothing. Useful in combination with move semantics

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::~basic_managed_heap_memory ( )
inline

Destructor.

Liberates the heap memory holding the managed data. Never throws.

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::basic_managed_heap_memory ( size_type  size)
inline

Creates heap memory and initializes the segment manager.

This can throw.

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::basic_managed_heap_memory ( BOOST_RV_REF(basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >)  moved)
inline

Moves the ownership of "moved"'s managed memory to *this. Does not throw.

References boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::swap().

Member Function Documentation

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
bool boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::grow ( size_type  extra_bytes)
inline

Tries to resize internal heap memory so that we have room for more objects.

WARNING: If memory is reallocated, all the objects will be binary-copied to the new buffer. To be able to use this function, all pointers constructed in this buffer must be offset pointers. Otherwise, the result is undefined. Returns true if the growth has been successful, so you will have some extra bytes to allocate new objects. If returns false, the heap allocation has failed.

References BOOST_CATCH, BOOST_CATCH_END, and BOOST_TRY.

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
basic_managed_heap_memory& boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::operator= ( BOOST_RV_REF(basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >)  moved)
inline

Moves the ownership of "moved"'s managed memory to *this. Does not throw.

References boost::move(), and boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::swap().

template<class CharType , class AllocationAlgorithm , template< class IndexConfig > class IndexType>
void boost::interprocess::basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType >::swap ( basic_managed_heap_memory< CharType, AllocationAlgorithm, IndexType > &  other)
inline

The documentation for this class was generated from the following files: