|
reSIProcate/rutil
9694
|
#include <SharedCount.hxx>

Public Member Functions | |
| shared_count () | |
| template<class P , class D > | |
| shared_count (P p, D d) | |
| template<class Y > | |
| shared_count (std::auto_ptr< Y > &r) | |
| ~shared_count () | |
| shared_count (shared_count const &r) | |
| shared_count & | operator= (shared_count const &r) |
| void | swap (shared_count &r) |
| long | use_count () const |
| bool | unique () const |
| void * | get_deleter (std::type_info const &ti) const |
Private Attributes | |
| sp_counted_base * | pi_ |
Friends | |
| bool | operator== (shared_count const &a, shared_count const &b) |
| bool | operator< (shared_count const &a, shared_count const &b) |
Definition at line 217 of file SharedCount.hxx.
| resip::shared_count::shared_count | ( | ) | [inline] |
Definition at line 225 of file SharedCount.hxx.
: pi_(0) // nothrow { }
| resip::shared_count::shared_count | ( | P | p, |
| D | d | ||
| ) | [inline] |
Definition at line 229 of file SharedCount.hxx.
References pi_.
| resip::shared_count::shared_count | ( | std::auto_ptr< Y > & | r | ) | [inline, explicit] |
Definition at line 244 of file SharedCount.hxx.
References resip::sp_counted_base::release().
: pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>())) { r.release(); }

| resip::shared_count::~shared_count | ( | ) | [inline] |
Definition at line 249 of file SharedCount.hxx.
References pi_, and resip::sp_counted_base::release().

| resip::shared_count::shared_count | ( | shared_count const & | r | ) | [inline] |
Definition at line 254 of file SharedCount.hxx.
References resip::sp_counted_base::add_ref_copy(), and pi_.

| void* resip::shared_count::get_deleter | ( | std::type_info const & | ti | ) | const [inline] |
Definition at line 296 of file SharedCount.hxx.
References resip::sp_counted_base::get_deleter(), and pi_.
Referenced by resip::SharedPtr< Foo >::_internal_get_deleter().

| shared_count& resip::shared_count::operator= | ( | shared_count const & | r | ) | [inline] |
Definition at line 259 of file SharedCount.hxx.
References resip::sp_counted_base::add_ref_copy(), pi_, and resip::sp_counted_base::release().
{
sp_counted_base * tmp = r.pi_;
if(tmp != 0) tmp->add_ref_copy();
if(pi_ != 0) pi_->release();
pi_ = tmp;
return *this;
}

| void resip::shared_count::swap | ( | shared_count & | r | ) | [inline] |
Definition at line 269 of file SharedCount.hxx.
References pi_.
Referenced by resip::SharedPtr< Foo >::swap().
| bool resip::shared_count::unique | ( | ) | const [inline] |
Definition at line 281 of file SharedCount.hxx.
References use_count().
Referenced by resip::SharedPtr< Foo >::unique().
{
return use_count() == 1;
}

| long resip::shared_count::use_count | ( | ) | const [inline] |
Definition at line 276 of file SharedCount.hxx.
References pi_, and resip::sp_counted_base::use_count().
Referenced by unique(), and resip::SharedPtr< Foo >::use_count().

| bool operator< | ( | shared_count const & | a, |
| shared_count const & | b | ||
| ) | [friend] |
Definition at line 291 of file SharedCount.hxx.
{
return std::less<sp_counted_base *>()(a.pi_, b.pi_);
}
| bool operator== | ( | shared_count const & | a, |
| shared_count const & | b | ||
| ) | [friend] |
Definition at line 286 of file SharedCount.hxx.
{
return a.pi_ == b.pi_;
}
sp_counted_base* resip::shared_count::pi_ [private] |
Definition at line 221 of file SharedCount.hxx.
Referenced by get_deleter(), operator=(), shared_count(), swap(), use_count(), and ~shared_count().
1.7.5.1