Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / interprocess / allocators / private_node_allocator.hpp
index 46b7dd6..8b546c3 100644 (file)
@@ -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_PRIVATE_NODE_ALLOCATOR_HPP
 #define BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
 
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
 #  pragma once
 #endif
 
@@ -38,7 +38,7 @@
 namespace boost {
 namespace interprocess {
 
-/// @cond
+#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
 
 namespace ipcdetail {
 
@@ -60,7 +60,7 @@ class private_node_allocator_base
    typedef SegmentManager                                segment_manager;
    typedef typename SegmentManager::void_pointer         void_pointer;
 
-   /// @cond
+   #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
    private:
    typedef private_node_allocator_base
       < Version, T, SegmentManager, NodesPerBlock>       self_t;
@@ -72,7 +72,7 @@ class private_node_allocator_base
 
    BOOST_STATIC_ASSERT((Version <=2));
 
-   /// @endcond
+   #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
 
    public:
 
@@ -97,12 +97,12 @@ class private_node_allocator_base
    //!Obtains node_allocator from other node_allocator
    template<class T2>
    struct rebind
-   { 
+   {
       typedef private_node_allocator_base
          <Version, T2, SegmentManager, NodesPerBlock>   other;
    };
 
-   /// @cond
+   #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
    template <int dummy>
    struct node_pool
    {
@@ -124,7 +124,7 @@ class private_node_allocator_base
 
    //!Not assignable from other private_node_allocator_base
    private_node_allocator_base& operator=(const private_node_allocator_base&);
-   /// @endcond
+   #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
 
    public:
    //!Constructor from a segment manager
@@ -162,10 +162,10 @@ class private_node_allocator_base
    friend void swap(self_t &alloc1,self_t &alloc2)
    {  alloc1.m_node_pool.swap(alloc2.m_node_pool);  }
 
-   /// @cond
+   #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
    private:
    node_pool_t m_node_pool;
-   /// @endcond
+   #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
 };
 
 //!Equality test for same type of private_node_allocator_base
@@ -198,7 +198,7 @@ class private_node_allocator_v1
 
    template<class T2>
    struct rebind
-   { 
+   {
       typedef private_node_allocator_v1<T2, SegmentManager, NodesPerBlock>  other;
    };
 
@@ -215,7 +215,7 @@ class private_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
@@ -228,14 +228,14 @@ template < class T
          , std::size_t NodesPerBlock
          >
 class private_node_allocator
-   /// @cond
+   #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
    :  public ipcdetail::private_node_allocator_base
          < 2
          , T
          , SegmentManager
          , NodesPerBlock
          >
-   /// @endcond
+   #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
 {
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
@@ -246,7 +246,7 @@ class private_node_allocator
 
    template<class T2>
    struct rebind
-   { 
+   {
       typedef private_node_allocator
          <T2, SegmentManager, NodesPerBlock>  other;
    };
@@ -279,7 +279,7 @@ class private_node_allocator
    //!private_node_allocator
    template<class T2>
    struct rebind
-   { 
+   {
       typedef private_node_allocator
          <T2, SegmentManager, NodesPerBlock> other;
    };
@@ -377,12 +377,12 @@ class private_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,
@@ -390,7 +390,7 @@ class private_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().
@@ -403,7 +403,7 @@ class private_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
@@ -416,7 +416,7 @@ class private_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
 };