STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Platform::WeakReference Class Reference

#include <vccorlib.h>

Classes

struct  BoolStruct
 

Public Types

typedef int BoolStruct::* BoolType
 

Public Member Functions

 WeakReference () throw ()
 
 WeakReference (decltype(__nullptr)) throw ()
 
 WeakReference (const WeakReference &__otherArg) throw ()
 
 WeakReference (WeakReference &&__otherArg) throw ()
 
 WeakReference (const volatile::Platform::Object^const __otherArg)
 
 ~WeakReference () throw ()
 
WeakReferenceoperator= (decltype(__nullptr)) throw ()
 
WeakReferenceoperator= (const WeakReference &__otherArg) throw ()
 
WeakReferenceoperator= (WeakReference &&__otherArg) throw ()
 
WeakReferenceoperator= (const volatile::Platform::Object^const __otherArg)
 
template<typename __TArg >
 __declspec (no_refcount) __TArg^Resolve() const
 
 operator BoolType () const throw ()
 

Private Member Functions

void InternalAddRef ()
 
void InternalRelease ()
 

Private Attributes

__abi_IUnknown * __weakPtr
 

Friends

bool operator== (const WeakReference &, const WeakReference &) throw ()
 
bool operator== (const WeakReference &, decltype(__nullptr)) throw ()
 
bool operator== (decltype(__nullptr), const WeakReference &) throw ()
 
bool operator!= (const WeakReference &, const WeakReference &) throw ()
 
bool operator!= (const WeakReference &, decltype(__nullptr)) throw ()
 
bool operator!= (decltype(__nullptr), const WeakReference &) throw ()
 
bool operator< (const WeakReference &, const WeakReference &) throw ()
 

Member Typedef Documentation

typedef int BoolStruct::* Platform::WeakReference::BoolType

Constructor & Destructor Documentation

Platform::WeakReference::WeakReference ( )
throw (
)
inline
2717  : __weakPtr(nullptr)
2718  {
2719  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
Platform::WeakReference::WeakReference ( decltype(__nullptr)  )
throw (
)
inline
2721  : __weakPtr(nullptr)
2722  {
2723  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
Platform::WeakReference::WeakReference ( const WeakReference __otherArg)
throw (
)
inline
2725  : __weakPtr(__otherArg.__weakPtr)
2726  {
2727  InternalAddRef();
2728  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void InternalAddRef()
Definition: vccorlib.h:2692
Platform::WeakReference::WeakReference ( WeakReference &&  __otherArg)
throw (
)
inline
2730  : __weakPtr(__otherArg.__weakPtr)
2731  {
2732  __otherArg.__weakPtr = nullptr;
2733  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
Platform::WeakReference::WeakReference ( const volatile::Platform::Object^const  __otherArg)
inlineexplicit
2735  : __weakPtr(nullptr)
2736  {
2737  __weakPtr = Details::GetWeakReference(__otherArg);
2738  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
Platform::WeakReference::~WeakReference ( )
throw (
)
inline
2741  {
2742  InternalRelease();
2743  }
void InternalRelease()
Definition: vccorlib.h:2700

Member Function Documentation

template<typename __TArg >
Platform::WeakReference::__declspec ( no_refcount  ) const
inline
2781  {
2782  return reinterpret_cast<__TArg^>(Details::ResolveWeakReference(__uuidof(__TArg^), &__weakPtr));
2783  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void Platform::WeakReference::InternalAddRef ( )
inlineprivate
2693  {
2694  if (__weakPtr != nullptr)
2695  {
2696  __weakPtr->__abi_AddRef();
2697  }
2698  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void Platform::WeakReference::InternalRelease ( )
inlineprivate
2701  {
2702  __abi_IUnknown* __tmp = __weakPtr;
2703  if (__tmp != nullptr)
2704  {
2705  __weakPtr = nullptr;
2706  __tmp->__abi_Release();
2707  }
2708  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
Platform::WeakReference::operator BoolType ( ) const
throw (
)
inline
2786  {
2787  return __weakPtr != nullptr ? &BoolStruct::Member : nullptr;
2788  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
int Member
Definition: vccorlib.h:2712
WeakReference& Platform::WeakReference::operator= ( decltype(__nullptr)  )
throw (
)
inline
2746  {
2747  InternalRelease();
2748  return *this;
2749  }
void InternalRelease()
Definition: vccorlib.h:2700
WeakReference& Platform::WeakReference::operator= ( const WeakReference __otherArg)
throw (
)
inline
2752  {
2753  if (&__otherArg != this)
2754  {
2755  InternalRelease();
2756  __weakPtr = __otherArg.__weakPtr;
2757  InternalAddRef();
2758  }
2759  return *this;
2760  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void InternalRelease()
Definition: vccorlib.h:2700
void InternalAddRef()
Definition: vccorlib.h:2692
WeakReference& Platform::WeakReference::operator= ( WeakReference &&  __otherArg)
throw (
)
inline
2763  {
2764  InternalRelease();
2765  __weakPtr = __otherArg.__weakPtr;
2766  __otherArg.__weakPtr = nullptr;
2767  return *this;
2768  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void InternalRelease()
Definition: vccorlib.h:2700
WeakReference& Platform::WeakReference::operator= ( const volatile::Platform::Object^const  __otherArg)
inline
2771  {
2772  __abi_IUnknown* __weakPtrLoc = Details::GetWeakReference(__otherArg);
2773  InternalRelease();
2774  __weakPtr = __weakPtrLoc;
2775  return *this;
2776  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2690
void InternalRelease()
Definition: vccorlib.h:2700

Friends And Related Function Documentation

bool operator!= ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2815  {
2816  return __aArg.__weakPtr != __bArg.__weakPtr;
2817  }
bool operator!= ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2820  {
2821  return __aArg.__weakPtr != nullptr;
2822  }
bool operator!= ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2825  {
2826  return __bArg.__weakPtr != nullptr;
2827  }
bool operator< ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2830  {
2831  return __aArg.__weakPtr < __bArg.__weakPtr;
2832  }
bool operator== ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2800  {
2801  return __aArg.__weakPtr == __bArg.__weakPtr;
2802  }
bool operator== ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2805  {
2806  return __aArg.__weakPtr == nullptr;
2807  }
bool operator== ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2810  {
2811  return __bArg.__weakPtr == nullptr;
2812  }

Member Data Documentation

__abi_IUnknown* Platform::WeakReference::__weakPtr
mutableprivate

The documentation for this class was generated from the following file: