array_count_impl.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Glen Joseph Fernandes
3  * glenfe at live dot com
4  *
5  * Distributed under the Boost Software License,
6  * Version 1.0. (See accompanying file LICENSE_1_0.txt
7  * or copy at http://boost.org/LICENSE_1_0.txt)
8  */
9 #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP
10 #define BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP
11 
14 
15 namespace boost {
16  namespace detail {
17  template<class P, class A>
19  : public sp_counted_base {
22  public:
23  sp_counted_impl_pda(P, D, const A& allocator_)
24  : allocator(allocator_) {
25  }
26 
27  virtual void dispose() {
28  allocator();
29  }
30 
31  virtual void destroy() {
32 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
33  typedef typename std::allocator_traits<A>::
34  template rebind_alloc<Y> YA;
35  typedef typename std::allocator_traits<A>::
36  template rebind_traits<Y> YT;
37 #else
38  typedef typename A::template rebind<Y>::other YA;
39 #endif
40  YA a1(allocator);
41 #if !defined(BOOST_NO_CXX11_ALLOCATOR)
42  YT::destroy(a1, this);
43  YT::deallocate(a1, this, 1);
44 #else
45  this->~Y();
46  a1.deallocate(this, 1);
47 #endif
48  }
49 
50  virtual void* get_deleter(const sp_typeinfo&) {
51  return &reinterpret_cast<char&>(allocator);
52  }
53 
54  virtual void* get_untyped_deleter() {
55  return &reinterpret_cast<char&>(allocator);
56  }
57 
58  private:
61 
63  };
64  }
65 }
66 
67 #endif
boost::detail::sp_counted_impl_pda::operator=
sp_counted_impl_pda & operator=(sp_counted_impl_pda const &)
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::destroy
virtual void destroy()
Definition: array_count_impl.hpp:31
boost::detail::sp_counted_impl_pda::sp_counted_impl_pda
sp_counted_impl_pda(sp_counted_impl_pda const &)
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::get_deleter
virtual void * get_deleter(const sp_typeinfo &)
Definition: array_count_impl.hpp:50
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::allocator
A allocator
Definition: array_count_impl.hpp:62
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::detail::sp_counted_base
Definition: sp_counted_base_acc_ia64.hpp:74
boost::detail::sp_typeinfo
boost::core::typeinfo sp_typeinfo
Definition: sp_typeinfo.hpp:28
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::Y
sp_counted_impl_pda< P, D, A > Y
Definition: array_count_impl.hpp:21
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::get_untyped_deleter
virtual void * get_untyped_deleter()
Definition: array_count_impl.hpp:54
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::dispose
virtual void dispose()
Definition: array_count_impl.hpp:27
array_allocator.hpp
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::sp_counted_impl_pda
sp_counted_impl_pda(P, D, const A &allocator_)
Definition: array_count_impl.hpp:23
boost::detail::ms_in_allocator_tag
Definition: array_allocator.hpp:310
boost::detail::sp_counted_impl_pda
Definition: sp_counted_impl.hpp:195
boost::detail::allocator::destroy
void destroy(const Type *p)
Definition: allocator_utilities.hpp:166
sp_counted_impl.hpp
boost::detail::sp_counted_impl_pda< P, ms_in_allocator_tag, A >::D
ms_in_allocator_tag D
Definition: array_count_impl.hpp:20


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:36:32