diff options
Diffstat (limited to 'boost/interprocess/allocators/node_allocator.hpp')
-rw-r--r-- | boost/interprocess/allocators/node_allocator.hpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/boost/interprocess/allocators/node_allocator.hpp b/boost/interprocess/allocators/node_allocator.hpp index 2c1fe566a3..af522f35b2 100644 --- a/boost/interprocess/allocators/node_allocator.hpp +++ b/boost/interprocess/allocators/node_allocator.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,7 +11,7 @@ #ifndef BOOST_INTERPROCESS_NODE_ALLOCATOR_HPP #define BOOST_INTERPROCESS_NODE_ALLOCATOR_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -39,7 +39,7 @@ namespace boost { namespace interprocess { -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) namespace ipcdetail{ @@ -63,7 +63,7 @@ class node_allocator_base typedef node_allocator_base <Version, T, SegmentManager, NodesPerBlock> self_t; - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) template <int dummy> struct node_pool @@ -74,7 +74,7 @@ class node_allocator_base static type *get(void *p) { return static_cast<type*>(p); } }; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED BOOST_STATIC_ASSERT((Version <=2)); @@ -102,11 +102,11 @@ class node_allocator_base //!node_allocator_base template<class T2> struct rebind - { + { typedef node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> other; }; - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: //!Not assignable from related node_allocator_base template<unsigned int Version2, class T2, class SegmentManager2, std::size_t N2> @@ -115,7 +115,7 @@ class node_allocator_base //!Not assignable from other node_allocator_base //node_allocator_base& operator=(const node_allocator_base&); - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Constructor from a segment manager. If not present, constructs a node @@ -128,8 +128,8 @@ class node_allocator_base //!count of the associated node pool. Never throws node_allocator_base(const node_allocator_base &other) : mp_node_pool(other.get_node_pool()) - { - node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count(); + { + node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count(); } //!Copy constructor from related node_allocator_base. If not present, constructs @@ -168,10 +168,10 @@ class node_allocator_base friend void swap(self_t &alloc1, self_t &alloc2) { ipcdetail::do_swap(alloc1.mp_node_pool, alloc2.mp_node_pool); } - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: void_pointer mp_node_pool; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }; //!Equality test for same type @@ -206,7 +206,7 @@ class node_allocator_v1 template<class T2> struct rebind - { + { typedef node_allocator_v1<T2, SegmentManager, NodesPerBlock> other; }; @@ -223,7 +223,7 @@ class node_allocator_v1 } //namespace ipcdetail{ -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED //!An STL node allocator that uses a segment manager as memory //!source. The internal pointer type will of the same type (raw, smart) as @@ -232,20 +232,20 @@ class node_allocator_v1 //!This node allocator shares a segregated storage between all instances //!of node_allocator with equal sizeof(T) placed in the same segment //!group. NodesPerBlock is the number of nodes allocated at once when the allocator -//!needs runs out of nodes +//!runs out of nodes template < class T , class SegmentManager , std::size_t NodesPerBlock > class node_allocator - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) : public ipcdetail::node_allocator_base < 2 , T , SegmentManager , NodesPerBlock > - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED { #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED @@ -256,7 +256,7 @@ class node_allocator template<class T2> struct rebind - { + { typedef node_allocator<T2, SegmentManager, NodesPerBlock> other; }; @@ -288,7 +288,7 @@ class node_allocator //!node_allocator template<class T2> struct rebind - { + { typedef node_allocator<T2, SegmentManager, NodesPerBlock> other; }; @@ -385,12 +385,12 @@ class node_allocator //!preferred_elements. The number of actually allocated elements is //!will be assigned to received_size. The elements must be deallocated //!with deallocate(...) - multiallocation_chain allocate_many(size_type elem_size, size_type num_elements); + void allocate_many(size_type elem_size, size_type num_elements, multiallocation_chain &chain); //!Allocates n_elements elements, each one of size elem_sizes[i]in a //!contiguous block //!of memory. The elements must be deallocated - multiallocation_chain allocate_many(const size_type *elem_sizes, size_type n_elements); + void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain); //!Allocates many elements of size elem_size in a contiguous block //!of memory. The minimum number to be allocated is min_elements, @@ -398,7 +398,7 @@ class node_allocator //!preferred_elements. The number of actually allocated elements is //!will be assigned to received_size. The elements must be deallocated //!with deallocate(...) - void deallocate_many(multiallocation_chain chain); + void deallocate_many(multiallocation_chain &chain); //!Allocates just one object. Memory allocated with this function //!must be deallocated only with deallocate_one(). @@ -411,7 +411,7 @@ class node_allocator //!preferred_elements. The number of actually allocated elements is //!will be assigned to received_size. Memory allocated with this function //!must be deallocated only with deallocate_one(). - multiallocation_chain allocate_individual(size_type num_elements); + void allocate_individual(size_type num_elements, multiallocation_chain &chain); //!Deallocates memory previously allocated with allocate_one(). //!You should never use deallocate_one to deallocate memory allocated @@ -424,7 +424,7 @@ class node_allocator //!preferred_elements. The number of actually allocated elements is //!will be assigned to received_size. Memory allocated with this function //!must be deallocated only with deallocate_one(). - void deallocate_individual(multiallocation_chain chain); + void deallocate_individual(multiallocation_chain &chain); #endif }; |