template <typename T>

class wp

Defined at line 402 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

---------------------------------------------------------------------------

Public Methods

void wp<T> ()

Defined at line 407 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

weakref_type * get_refs ()

Accessors

Defined at line 455 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

T * unsafe_get ()

Defined at line 457 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

bool operator== (const T * o)

Operators

Defined at line 461 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator== (const U * o)

Operators

Defined at line 461 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

bool operator!= (const T * o)

Operators

Defined at line 462 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator!= (const U * o)

Operators

Defined at line 462 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator> (const U * o)

Operators

Defined at line 463 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator< (const U * o)

Operators

Defined at line 464 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator<= (const U * o)

Operators

Defined at line 465 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <>
bool operator>= (const U * o)

Operators

Defined at line 466 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator== (const wp<U> & o)

Operators

Defined at line 469 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator== (const sp<U> & o)

Defined at line 474 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator!= (const sp<U> & o)

Defined at line 485 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator> (const wp<U> & o)

Defined at line 490 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator< (const wp<U> & o)

Defined at line 499 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator!= (const wp<U> & o)

Defined at line 506 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator<= (const wp<U> & o)

Defined at line 507 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
bool operator>= (const wp<U> & o)

Defined at line 508 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

wp<T> fromExisting (T * other)

Implementation invariants:

Either

1) m_ptr and m_refs are both null, or

2) m_refs == m_ptr->mRefs, or

3) *m_ptr is no longer live, and m_refs points to the weakref_type object that corresponded

to m_ptr while it was live. *m_refs remains live while a wp

<

> refers to it.

The m_refs field in a RefBase object is allocated on construction, unique to that RefBase

object, and never changes. Thus if two wp's have identical m_refs fields, they are either both

null or point to the same object. If two wp's have identical m_ptr fields, they either both

point to the same live object and thus have the same m_ref fields, or at least one of the

objects is no longer live.

Note that the above comparison operations go out of their way to provide an ordering consistent

with ordinary pointer comparison; otherwise they could ignore m_ptr, and just compare m_refs.

Defined at line 540 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void wp<T> (T * other)

Defined at line 554 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
void wp<T> (U * other)

Defined at line 561 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

wp<T> & operator= (T * other)

Defined at line 567 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
wp<T> & operator= (U * other)

Defined at line 576 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void wp<T> (const wp<T> & other)

Defined at line 587 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void wp<T> (const sp<T> & other)

Defined at line 594 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
void wp<T> (const sp<U> & other)

Defined at line 613 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
void wp<T> (const wp<U> & other)

Defined at line 601 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void ~wp<T> ()

Defined at line 620 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

wp<T> & operator= (const wp<T> & other)

Assignment

Defined at line 626 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

wp<T> & operator= (const sp<T> & other)

Defined at line 638 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
wp<T> & operator= (const wp<U> & other)

Defined at line 650 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

template <typename U>
wp<T> & operator= (const sp<U> & other)

Defined at line 662 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void set_object_and_refs (T * other, weakref_type * refs)

Defined at line 673 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

sp<T> promote ()

promotion to sp

Defined at line 682 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

void clear ()

Reset

Defined at line 692 of file ../../third_party/android/platform/system/core/include/utils/RefBase.h

Friends

template <typename Y>
class wp
template <typename Y>
class sp