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
2681  : __weakPtr(nullptr)
2682  {
2683  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
Platform::WeakReference::WeakReference ( decltype(__nullptr)  )
throw (
)
inline
2685  : __weakPtr(nullptr)
2686  {
2687  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
Platform::WeakReference::WeakReference ( const WeakReference __otherArg)
throw (
)
inline
2689  : __weakPtr(__otherArg.__weakPtr)
2690  {
2691  InternalAddRef();
2692  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void InternalAddRef()
Definition: vccorlib.h:2656
Platform::WeakReference::WeakReference ( WeakReference &&  __otherArg)
throw (
)
inline
2694  : __weakPtr(__otherArg.__weakPtr)
2695  {
2696  __otherArg.__weakPtr = nullptr;
2697  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
Platform::WeakReference::WeakReference ( const volatile::Platform::Object^const  __otherArg)
inlineexplicit
2699  : __weakPtr(nullptr)
2700  {
2701  __weakPtr = Details::GetWeakReference(__otherArg);
2702  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
Platform::WeakReference::~WeakReference ( )
throw (
)
inline
2705  {
2706  InternalRelease();
2707  }
void InternalRelease()
Definition: vccorlib.h:2664

Member Function Documentation

template<typename __TArg >
Platform::WeakReference::__declspec ( no_refcount  ) const
inline
2745  {
2746  return reinterpret_cast<__TArg^>(Details::ResolveWeakReference(__uuidof(__TArg^), &__weakPtr));
2747  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void Platform::WeakReference::InternalAddRef ( )
inlineprivate
2657  {
2658  if (__weakPtr != nullptr)
2659  {
2660  __weakPtr->__abi_AddRef();
2661  }
2662  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void Platform::WeakReference::InternalRelease ( )
inlineprivate
2665  {
2666  __abi_IUnknown* __tmp = __weakPtr;
2667  if (__tmp != nullptr)
2668  {
2669  __weakPtr = nullptr;
2670  __tmp->__abi_Release();
2671  }
2672  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
Platform::WeakReference::operator BoolType ( ) const
throw (
)
inline
2750  {
2751  return __weakPtr != nullptr ? &BoolStruct::Member : nullptr;
2752  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
int Member
Definition: vccorlib.h:2676
WeakReference& Platform::WeakReference::operator= ( decltype(__nullptr)  )
throw (
)
inline
2710  {
2711  InternalRelease();
2712  return *this;
2713  }
void InternalRelease()
Definition: vccorlib.h:2664
WeakReference& Platform::WeakReference::operator= ( const WeakReference __otherArg)
throw (
)
inline
2716  {
2717  if (&__otherArg != this)
2718  {
2719  InternalRelease();
2720  __weakPtr = __otherArg.__weakPtr;
2721  InternalAddRef();
2722  }
2723  return *this;
2724  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void InternalRelease()
Definition: vccorlib.h:2664
void InternalAddRef()
Definition: vccorlib.h:2656
WeakReference& Platform::WeakReference::operator= ( WeakReference &&  __otherArg)
throw (
)
inline
2727  {
2728  InternalRelease();
2729  __weakPtr = __otherArg.__weakPtr;
2730  __otherArg.__weakPtr = nullptr;
2731  return *this;
2732  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void InternalRelease()
Definition: vccorlib.h:2664
WeakReference& Platform::WeakReference::operator= ( const volatile::Platform::Object^const  __otherArg)
inline
2735  {
2736  __abi_IUnknown* __weakPtrLoc = Details::GetWeakReference(__otherArg);
2737  InternalRelease();
2738  __weakPtr = __weakPtrLoc;
2739  return *this;
2740  }
__abi_IUnknown * __weakPtr
Definition: vccorlib.h:2654
void InternalRelease()
Definition: vccorlib.h:2664

Friends And Related Function Documentation

bool operator!= ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2779  {
2780  return __aArg.__weakPtr != __bArg.__weakPtr;
2781  }
bool operator!= ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2784  {
2785  return __aArg.__weakPtr != nullptr;
2786  }
bool operator!= ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2789  {
2790  return __bArg.__weakPtr != nullptr;
2791  }
bool operator< ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2794  {
2795  return __aArg.__weakPtr < __bArg.__weakPtr;
2796  }
bool operator== ( const WeakReference __aArg,
const WeakReference __bArg 
)
throw (
)
friend
2764  {
2765  return __aArg.__weakPtr == __bArg.__weakPtr;
2766  }
bool operator== ( const WeakReference __aArg,
decltype(__nullptr)   
)
throw (
)
friend
2769  {
2770  return __aArg.__weakPtr == nullptr;
2771  }
bool operator== ( decltype(__nullptr)  ,
const WeakReference __bArg 
)
throw (
)
friend
2774  {
2775  return __bArg.__weakPtr == nullptr;
2776  }

Member Data Documentation

__abi_IUnknown* Platform::WeakReference::__weakPtr
mutableprivate

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