Chromium Embedded Framework (CEF)  109.0.1+gcd5e37a+chromium-109.0.5414.8
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 >:

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...
 

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: