memory 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 1997-1999
  3. * Silicon Graphics Computer Systems, Inc.
  4. *
  5. * Copyright (c) 1999
  6. * Boris Fomitchev
  7. *
  8. * This material is provided "as is", with absolutely no warranty expressed
  9. * or implied. Any use is at your own risk.
  10. *
  11. * Permission to use or copy this software for any purpose is hereby granted
  12. * without fee, provided the above notices are retained on all copies.
  13. * Permission to modify the code and to distribute modified code is granted,
  14. * provided the above notices are retained, and a notice that the code was
  15. * modified is included with the above copyright notice.
  16. *
  17. */
  18. #ifndef _STLP_MEMORY
  19. #ifndef _STLP_OUTERMOST_HEADER_ID
  20. # define _STLP_OUTERMOST_HEADER_ID 0x46
  21. # include <stl/_prolog.h>
  22. # define _STLP_MEMORY
  23. #endif
  24. #if (_STLP_OUTERMOST_HEADER_ID == 0x46)
  25. # ifndef _STLP_INTERNAL_ALLOC_H
  26. # include <stl/_alloc.h>
  27. # endif
  28. # ifndef _STLP_INTERNAL_TEMPBUF_H
  29. # include <stl/_tempbuf.h>
  30. # endif
  31. # ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H
  32. # include <stl/_raw_storage_iter.h>
  33. # endif
  34. # include <stl/_auto_ptr.h>
  35. #endif
  36. #if (_STLP_OUTERMOST_HEADER_ID != 0x46) || defined (_STLP_IMPORT_VENDOR_STD)
  37. # if defined (__MSL__)
  38. # include _STLP_NATIVE_HEADER(limits)
  39. # endif
  40. # if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
  41. # define BOOST_TR1_MEMORY_INCLUDED
  42. # define BOOST_TR1_FULL_MEMORY_INCLUDED
  43. # endif
  44. # if defined (_STLP_HAS_INCLUDE_NEXT)
  45. # include_next <memory>
  46. # else
  47. # include _STLP_NATIVE_HEADER(memory)
  48. # endif
  49. # if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201)
  50. /* 980401 vss MSL 2.4 Pro 3 Release */
  51. # include <new_mem.h>
  52. # endif
  53. #endif
  54. #if (_STLP_OUTERMOST_HEADER_ID == 0x46)
  55. # include <stl/_epilog.h>
  56. # undef _STLP_OUTERMOST_HEADER_ID
  57. #endif
  58. #if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
  59. namespace boost {
  60. class bad_weak_ptr;
  61. template<class T> class shared_ptr;
  62. template<class T> class weak_ptr;
  63. template<class T> class enable_shared_from_this;
  64. template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
  65. template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
  66. template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
  67. template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
  68. template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
  69. template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
  70. namespace detail{
  71. class shared_count;
  72. class weak_count;
  73. }
  74. } // namespace boost
  75. # ifndef BOOST_SHARED_PTR_HPP_INCLUDED
  76. # include <boost/shared_ptr.hpp>
  77. # endif
  78. # ifndef BOOST_WEAK_PTR_HPP_INCLUDED
  79. # include <boost/weak_ptr.hpp>
  80. # endif
  81. # ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED
  82. # include <boost/enable_shared_from_this.hpp>
  83. # endif
  84. _STLP_BEGIN_NAMESPACE
  85. namespace tr1 {
  86. using ::boost::bad_weak_ptr;
  87. using ::boost::shared_ptr;
  88. using ::boost::swap;
  89. using ::boost::static_pointer_cast;
  90. using ::boost::dynamic_pointer_cast;
  91. using ::boost::const_pointer_cast;
  92. using ::boost::get_deleter;
  93. using ::boost::weak_ptr;
  94. using ::boost::enable_shared_from_this;
  95. // shared_ptr IO
  96. // weak_ptr IO
  97. } // namespace tr1
  98. _STLP_END_NAMESPACE
  99. #endif /* !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT */
  100. #endif /* _STLP_MEMORY */
  101. // Local Variables:
  102. // mode:C++
  103. // End: