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
2690  : __weakPtr(nullptr)
2691  {
2692  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
Platform::WeakReference::WeakReference ( decltype(__nullptr)  )
throw (
)
inline
2694  : __weakPtr(nullptr)
2695  {
2696  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
Platform::WeakReference::WeakReference ( const WeakReference __otherArg)
throw (
)
inline
2698  : __weakPtr(__otherArg.__weakPtr)
2699  {
2700  InternalAddRef();
2701  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void InternalAddRef()
Definition: vccorlib.h:2665
Platform::WeakReference::WeakReference ( WeakReference &&  __otherArg)
throw (
)
inline
2703  : __weakPtr(__otherArg.__weakPtr)
2704  {
2705  __otherArg.__weakPtr = nullptr;
2706  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
Platform::WeakReference::WeakReference ( const volatile::Platform::Object^const  __otherArg)
inlineexplicit
2708  : __weakPtr(nullptr)
2709  {
2710  __weakPtr = Details::GetWeakReference(__otherArg);
2711  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
Platform::WeakReference::~WeakReference ( )
throw (
)
inline
2714  {
2715  InternalRelease();
2716  }
void InternalRelease()
Definition: vccorlib.h:2673

Member Function Documentation

template<typename __TArg >
Platform::WeakReference::__declspec ( no_refcount  ) const
inline
2754  {
2755  return reinterpret_cast<__TArg^>(Details::ResolveWeakReference(__uuidof(__TArg^), &__weakPtr));
2756  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void Platform::WeakReference::InternalAddRef ( )
inlineprivate
2666  {
2667  if (__weakPtr != nullptr)
2668  {
2669  __weakPtr->__abi_AddRef();
2670  }
2671  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void Platform::WeakReference::InternalRelease ( )
inlineprivate
2674  {
2675  __abi_IUnknown* __tmp = __weakPtr;
2676  if (__tmp != nullptr)
2677  {
2678  __weakPtr = nullptr;
2679  __tmp->__abi_Release();
2680  }
2681  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
Platform::WeakReference::operator BoolType ( ) const
throw (
)
inline
2759  {
2760  return __weakPtr != nullptr ? &BoolStruct::Member : nullptr;
2761  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
int Member
Definition: vccorlib.h:2685
WeakReference& Platform::WeakReference::operator= ( decltype(__nullptr)  )
throw (
)
inline
2719  {
2720  InternalRelease();
2721  return *this;
2722  }
void InternalRelease()
Definition: vccorlib.h:2673
WeakReference& Platform::WeakReference::operator= ( const WeakReference __otherArg)
throw (
)
inline
2725  {
2726  if (&__otherArg != this)
2727  {
2728  InternalRelease();
2729  __weakPtr = __otherArg.__weakPtr;
2730  InternalAddRef();
2731  }
2732  return *this;
2733  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void InternalRelease()
Definition: vccorlib.h:2673
void InternalAddRef()
Definition: vccorlib.h:2665
WeakReference& Platform::WeakReference::operator= ( WeakReference &&  __otherArg)
throw (
)
inline
2736  {
2737  InternalRelease();
2738  __weakPtr = __otherArg.__weakPtr;
2739  __otherArg.__weakPtr = nullptr;
2740  return *this;
2741  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void InternalRelease()
Definition: vccorlib.h:2673
WeakReference& Platform::WeakReference::operator= ( const volatile::Platform::Object^const  __otherArg)
inline
2744  {
2745  __abi_IUnknown* __weakPtrLoc = Details::GetWeakReference(__otherArg);
2746  InternalRelease();
2747  __weakPtr = __weakPtrLoc;
2748  return *this;
2749  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2663
void InternalRelease()
Definition: vccorlib.h:2673

Friends And Related Function Documentation

bool operator!= ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2788  {
2789  return __aArg.__weakPtr != __bArg.__weakPtr;
2790  }
bool operator!= ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2793  {
2794  return __aArg.__weakPtr != nullptr;
2795  }
bool operator!= ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2798  {
2799  return __bArg.__weakPtr != nullptr;
2800  }
bool operator< ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2803  {
2804  return __aArg.__weakPtr < __bArg.__weakPtr;
2805  }
bool operator== ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2773  {
2774  return __aArg.__weakPtr == __bArg.__weakPtr;
2775  }
bool operator== ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2778  {
2779  return __aArg.__weakPtr == nullptr;
2780  }
bool operator== ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2783  {
2784  return __bArg.__weakPtr == nullptr;
2785  }

Member Data Documentation

__abi_IUnknown* Platform::WeakReference::__weakPtr
mutableprivate

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