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 19 #ifndef _STLP_MEMORY 20 21 #ifndef _STLP_OUTERMOST_HEADER_ID 22 # define _STLP_OUTERMOST_HEADER_ID 0x46 23 # include <stl/_prolog.h> 24 # define _STLP_MEMORY 25 #endif 26 27 #if (_STLP_OUTERMOST_HEADER_ID == 0x46) 28 # ifndef _STLP_INTERNAL_ALLOC_H 29 # include <stl/_alloc.h> 30 # endif 31 32 # ifndef _STLP_INTERNAL_TEMPBUF_H 33 # include <stl/_tempbuf.h> 34 # endif 35 36 # ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H 37 # include <stl/_raw_storage_iter.h> 38 # endif 39 40 # include <stl/_auto_ptr.h> 41 #endif 42 43 #if (_STLP_OUTERMOST_HEADER_ID != 0x46) || defined (_STLP_IMPORT_VENDOR_STD) 44 # if defined (__MSL__) 45 # include _STLP_NATIVE_HEADER(limits) 46 # endif 47 48 # if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT) 49 # define BOOST_TR1_MEMORY_INCLUDED 50 # define BOOST_TR1_FULL_MEMORY_INCLUDED 51 # endif 52 53 # if defined (_STLP_HAS_INCLUDE_NEXT) 54 # include_next <memory> 55 # else 56 # include _STLP_NATIVE_HEADER(memory) 57 # endif 58 59 # if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201) 60 /* 980401 vss MSL 2.4 Pro 3 Release */ 61 # include <new_mem.h> 62 # endif 63 #endif 64 65 #if (_STLP_OUTERMOST_HEADER_ID == 0x46) 66 # include <stl/_epilog.h> 67 # undef _STLP_OUTERMOST_HEADER_ID 68 #endif 69 70 #if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT) 71 72 namespace boost { 73 74 class bad_weak_ptr; 75 template<class T> class shared_ptr; 76 template<class T> class weak_ptr; 77 template<class T> class enable_shared_from_this; 78 template<class D, class T> D * get_deleter(shared_ptr<T> const & p); 79 template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r); 80 template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r); 81 template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r); 82 template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b); 83 template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b); 84 85 namespace detail{ 86 class shared_count; 87 class weak_count; 88 } 89 90 } // namespace boost 91 92 # ifndef BOOST_SHARED_PTR_HPP_INCLUDED 93 # include <boost/shared_ptr.hpp> 94 # endif 95 # ifndef BOOST_WEAK_PTR_HPP_INCLUDED 96 # include <boost/weak_ptr.hpp> 97 # endif 98 # ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED 99 # include <boost/enable_shared_from_this.hpp> 100 # endif 101 102 _STLP_BEGIN_NAMESPACE 103 104 namespace tr1 { 105 106 using ::boost::bad_weak_ptr; 107 using ::boost::shared_ptr; 108 using ::boost::swap; 109 using ::boost::static_pointer_cast; 110 using ::boost::dynamic_pointer_cast; 111 using ::boost::const_pointer_cast; 112 using ::boost::get_deleter; 113 using ::boost::weak_ptr; 114 using ::boost::enable_shared_from_this; 115 116 // shared_ptr IO 117 // weak_ptr IO 118 119 } // namespace tr1 120 121 _STLP_END_NAMESPACE 122 123 #endif /* !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT */ 124 125 #endif /* _STLP_MEMORY */ 126 127 // Local Variables: 128 // mode:C++ 129 // End: 130 131