#include <memory.h>
Public 型 | |
typedef T | element_type |
typedef T * | Tp |
Public メソッド | |
shared_ptr () | |
template<class Y> | |
shared_ptr (Y *p) | |
template<class Y, class Deleter> | |
shared_ptr (Y *p, Deleter d) | |
shared_ptr (shared_ptr const &r) | |
template<class Y> | |
shared_ptr (shared_ptr< Y > const &r) | |
template<class Y> | |
shared_ptr (weak_ptr< Y > const &r) | |
template<class Y> | |
shared_ptr (auto_ptr< Y > &r) | |
~shared_ptr () | |
shared_ptr & | operator= (shared_ptr const &r) |
template<class Y> | |
shared_ptr & | operator= (shared_ptr< Y > const &r) |
template<class Y> | |
shared_ptr & | operator= (auto_ptr< Y > &r) |
void | swap (shared_ptr &r) |
void | reset () |
template<class Y> | |
void | reset (Y *p) |
template<class Y, class D> | |
void | reset (Y *p, D d) |
T * | get () const |
T & | operator* () const |
T * | operator-> () const |
long | use_count () const |
bool | unique () const |
operator unspecified_bool_type () const | |
構成 | |
class | ref_counter |
typedef T coil::shared_ptr< T >::element_type |
typedef T* coil::shared_ptr< T >::Tp |
coil::shared_ptr< T >::shared_ptr | ( | ) | [inline] |
1 Effects: Constructs an empty shared_ptr object. 2 Postconditions: use_count() == 0 && get() == 0. 3 Throws: nothing.
4 Requires: p shall be convertible to T*. Y shall be a complete type. The expression delete p shall be well-formed, shall have well defined behavior, and shall not throw exceptions. 5 Effects: Constructs a shared_ptr object that owns the pointer p. 6 Postconditions: use_count() == 1 && get() == p. 7 Throws: bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained. 8 Exception safety: If an exception is thrown, delete p is called.
coil::shared_ptr< T >::shared_ptr | ( | Y * | p, | |
Deleter | d | |||
) | [inline] |
9 Requires: p shall be convertible to T*. D shall be CopyConstructible. The copy constructor and destructor of D shall not throw exceptions. The expression d(p) shall be well-formed, shall have well defined behavior, and shall not throw exceptions. 10 Effects: Constructs a shared_ptr object that owns the pointer p and the deleter d. 11 Postconditions: use_count() == 1 && get() == p. 12 Throws: bad_alloc, or an implementation-defined exception when a resource other than memory could not be obtained. 13 Exception safety: If an exception is thrown, d(p) is called.
coil::shared_ptr< T >::shared_ptr | ( | shared_ptr< T > const & | r | ) | [inline] |
14 Requires: For the second constructor Y* shall be convertible to T*. 15 Effects: If r is empty, constructs an empty shared_ptr object; otherwise, constructs a shared_ptr object that shares ownership with r. 16 Postconditions: get() == r.get() && use_count() == r.use_count(). 17 Throws: nothing.
coil::shared_ptr< T >::shared_ptr | ( | shared_ptr< Y > const & | r | ) | [inline] |
coil::shared_ptr< T >::shared_ptr | ( | weak_ptr< Y > const & | r | ) | [inline, explicit] |
coil::shared_ptr< T >::shared_ptr | ( | auto_ptr< Y > & | r | ) | [inline, explicit] |
coil::shared_ptr< T >::~shared_ptr | ( | ) |
shared_ptr& coil::shared_ptr< T >::operator= | ( | shared_ptr< T > const & | r | ) |
shared_ptr& coil::shared_ptr< T >::operator= | ( | shared_ptr< Y > const & | r | ) | [inline] |
shared_ptr& coil::shared_ptr< T >::operator= | ( | auto_ptr< Y > & | r | ) | [inline] |
void coil::shared_ptr< T >::swap | ( | shared_ptr< T > & | r | ) |
void coil::shared_ptr< T >::reset | ( | ) |
void coil::shared_ptr< T >::reset | ( | Y * | p, | |
D | d | |||
) | [inline] |
T* coil::shared_ptr< T >::get | ( | ) | const |
T& coil::shared_ptr< T >::operator* | ( | ) | const |
T* coil::shared_ptr< T >::operator-> | ( | ) | const |
long coil::shared_ptr< T >::use_count | ( | ) | const |
bool coil::shared_ptr< T >::unique | ( | ) | const |
coil::shared_ptr< T >::operator unspecified_bool_type | ( | ) | const |