Chromium Embedded Framework (CEF)  122.1.5+gf09a9bc+chromium-122.0.6261.29
base::WeakPtrFactory< T > Class Template Reference

A class may be composed of a WeakPtrFactory and thereby control how it exposes weak pointers to itself. More...

#include "include/base/cef_weak_ptr.h"

Inheritance diagram for base::WeakPtrFactory< T >:
base::cef_internal::WeakPtrFactoryBase

Public Member Functions

 WeakPtrFactory ()=delete
 
 WeakPtrFactory (T *ptr)
 
 WeakPtrFactory (const WeakPtrFactory &)=delete
 
WeakPtrFactoryoperator= (const WeakPtrFactory &)=delete
 
 ~WeakPtrFactory ()=default
 
WeakPtr< T > GetWeakPtr () const
 
void InvalidateWeakPtrs ()
 Call this method to invalidate all existing weak pointers. More...
 
bool HasWeakPtrs () const
 Call this method to determine if any weak pointers exist. More...
 

Additional Inherited Members

- Protected Member Functions inherited from base::cef_internal::WeakPtrFactoryBase
 WeakPtrFactoryBase (uintptr_t ptr)
 
 ~WeakPtrFactoryBase ()
 
- Protected Attributes inherited from base::cef_internal::WeakPtrFactoryBase
cef_internal::WeakReferenceOwner weak_reference_owner_
 
uintptr_t ptr_
 

Detailed Description

template<class T>
class base::WeakPtrFactory< T >

A class may be composed of a WeakPtrFactory and thereby control how it exposes weak pointers to itself.

This is helpful if you only need weak pointers within the implementation of a class. This class is also useful when working with primitive types. For example, you could have a WeakPtrFactory<bool> that is used to pass around a weak reference to a bool.

Constructor & Destructor Documentation

◆ WeakPtrFactory() [1/3]

template<class T >
base::WeakPtrFactory< T >::WeakPtrFactory ( )
delete

◆ WeakPtrFactory() [2/3]

template<class T >
base::WeakPtrFactory< T >::WeakPtrFactory ( T *  ptr)
inlineexplicit

◆ WeakPtrFactory() [3/3]

template<class T >
base::WeakPtrFactory< T >::WeakPtrFactory ( const WeakPtrFactory< T > &  )
delete

◆ ~WeakPtrFactory()

template<class T >
base::WeakPtrFactory< T >::~WeakPtrFactory ( )
default

Member Function Documentation

◆ GetWeakPtr()

template<class T >
WeakPtr<T> base::WeakPtrFactory< T >::GetWeakPtr ( ) const
inline

◆ HasWeakPtrs()

template<class T >
bool base::WeakPtrFactory< T >::HasWeakPtrs ( ) const
inline

Call this method to determine if any weak pointers exist.

◆ InvalidateWeakPtrs()

template<class T >
void base::WeakPtrFactory< T >::InvalidateWeakPtrs ( )
inline

Call this method to invalidate all existing weak pointers.

◆ operator=()

template<class T >
WeakPtrFactory& base::WeakPtrFactory< T >::operator= ( const WeakPtrFactory< T > &  )
delete

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