Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Friends | List of all members
fml::TaskRunnerAffineWeakPtr< T > Class Template Reference

#include <weak_ptr.h>

Public Member Functions

 TaskRunnerAffineWeakPtr ()
 
 TaskRunnerAffineWeakPtr (const TaskRunnerAffineWeakPtr< T > &r)=default
 
template<typename U >
 TaskRunnerAffineWeakPtr (const TaskRunnerAffineWeakPtr< U > &r)
 
 TaskRunnerAffineWeakPtr (TaskRunnerAffineWeakPtr< T > &&r)=default
 
template<typename U >
 TaskRunnerAffineWeakPtr (TaskRunnerAffineWeakPtr< U > &&r)
 
 ~TaskRunnerAffineWeakPtr ()=default
 
TaskRunnerAffineWeakPtr< T > & operator= (const TaskRunnerAffineWeakPtr< T > &r)=default
 
TaskRunnerAffineWeakPtr< T > & operator= (TaskRunnerAffineWeakPtr< T > &&r)=default
 
void reset ()
 
 operator bool () const
 
Tget () const
 
Toperator* () const
 
Toperator-> () const
 

Protected Member Functions

void CheckThreadSafety () const
 

Friends

template<typename U >
class TaskRunnerAffineWeakPtr
 
class TaskRunnerAffineWeakPtrFactory< T >
 

Detailed Description

template<typename T>
class fml::TaskRunnerAffineWeakPtr< T >

Definition at line 138 of file weak_ptr.h.

Constructor & Destructor Documentation

◆ TaskRunnerAffineWeakPtr() [1/5]

template<typename T >
fml::TaskRunnerAffineWeakPtr< T >::TaskRunnerAffineWeakPtr ( )
inline

Definition at line 140 of file weak_ptr.h.

140: ptr_(nullptr) {}

◆ TaskRunnerAffineWeakPtr() [2/5]

template<typename T >
fml::TaskRunnerAffineWeakPtr< T >::TaskRunnerAffineWeakPtr ( const TaskRunnerAffineWeakPtr< T > &  r)
default

◆ TaskRunnerAffineWeakPtr() [3/5]

template<typename T >
template<typename U >
fml::TaskRunnerAffineWeakPtr< T >::TaskRunnerAffineWeakPtr ( const TaskRunnerAffineWeakPtr< U > &  r)
inline

Definition at line 146 of file weak_ptr.h.

147 : ptr_(static_cast<T*>(r.ptr_)), flag_(r.flag_), checker_(r.checker_) {}
#define T
Definition: precompiler.cc:65

◆ TaskRunnerAffineWeakPtr() [4/5]

template<typename T >
fml::TaskRunnerAffineWeakPtr< T >::TaskRunnerAffineWeakPtr ( TaskRunnerAffineWeakPtr< T > &&  r)
default

◆ TaskRunnerAffineWeakPtr() [5/5]

template<typename T >
template<typename U >
fml::TaskRunnerAffineWeakPtr< T >::TaskRunnerAffineWeakPtr ( TaskRunnerAffineWeakPtr< U > &&  r)
inline

Definition at line 153 of file weak_ptr.h.

154 : ptr_(static_cast<T*>(r.ptr_)),
155 flag_(std::move(r.flag_)),
156 checker_(r.checker_) {}

◆ ~TaskRunnerAffineWeakPtr()

template<typename T >
fml::TaskRunnerAffineWeakPtr< T >::~TaskRunnerAffineWeakPtr ( )
default

Member Function Documentation

◆ CheckThreadSafety()

template<typename T >
void fml::TaskRunnerAffineWeakPtr< T >::CheckThreadSafety ( ) const
inlineprotected

Definition at line 194 of file weak_ptr.h.

194 {
195 FML_DCHECK_TASK_RUNNER_IS_CURRENT(checker_.checker);
196 }
#define FML_DCHECK_TASK_RUNNER_IS_CURRENT(c)

◆ get()

template<typename T >
T * fml::TaskRunnerAffineWeakPtr< T >::get ( ) const
inline

Definition at line 176 of file weak_ptr.h.

176 {
178 return *this ? ptr_ : nullptr;
179 }
void CheckThreadSafety() const
Definition: weak_ptr.h:194

◆ operator bool()

template<typename T >
fml::TaskRunnerAffineWeakPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 171 of file weak_ptr.h.

171 {
173 return flag_ && flag_->is_valid();
174 }

◆ operator*()

template<typename T >
T & fml::TaskRunnerAffineWeakPtr< T >::operator* ( ) const
inline

Definition at line 181 of file weak_ptr.h.

181 {
183 FML_DCHECK(*this);
184 return *get();
185 }
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ operator->()

template<typename T >
T * fml::TaskRunnerAffineWeakPtr< T >::operator-> ( ) const
inline

Definition at line 187 of file weak_ptr.h.

187 {
189 FML_DCHECK(*this);
190 return get();
191 }

◆ operator=() [1/2]

template<typename T >
TaskRunnerAffineWeakPtr< T > & fml::TaskRunnerAffineWeakPtr< T >::operator= ( const TaskRunnerAffineWeakPtr< T > &  r)
default

◆ operator=() [2/2]

template<typename T >
TaskRunnerAffineWeakPtr< T > & fml::TaskRunnerAffineWeakPtr< T >::operator= ( TaskRunnerAffineWeakPtr< T > &&  r)
default

◆ reset()

template<typename T >
void fml::TaskRunnerAffineWeakPtr< T >::reset ( )
inline

Definition at line 166 of file weak_ptr.h.

166{ flag_ = nullptr; }

Friends And Related Function Documentation

◆ TaskRunnerAffineWeakPtr

template<typename T >
template<typename U >
friend class TaskRunnerAffineWeakPtr
friend

Definition at line 200 of file weak_ptr.h.

◆ TaskRunnerAffineWeakPtrFactory< T >

template<typename T >
friend class TaskRunnerAffineWeakPtrFactory< T >
friend

Definition at line 200 of file weak_ptr.h.


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