Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Protected Member Functions | Protected Attributes | Friends | List of all members
fml::WeakNSProtocol< NST > Class Template Reference

#include <weak_nsobject.h>

Inheritance diagram for fml::WeakNSProtocol< NST >:
fml::WeakNSObject< flutter::FlutterViewController >

Instance Methods

() - WeakNSProtocol
 
() - WeakNSProtocol
 
() - ~WeakNSProtocol
 
(void) - reset
 
(NST) - get
 
(WeakNSProtocol &) - operator=
 
(bool) - operator==
 
(bool) - operator!=
 
() - operator NST
 

Protected Member Functions

() - WeakNSProtocol
 
(void) - CheckThreadSafety
 

Protected Attributes

RefPtr< fml::WeakContainercontainer_
 
debug::DebugThreadChecker checker_
 

Friends

class WeakNSObjectFactory< NST >
 

Detailed Description

Definition at line 118 of file weak_nsobject.h.

Constructor & Destructor Documentation

◆ WeakNSProtocol [1/3]

- (WeakNSProtocol< NST >):

◆ WeakNSProtocol [2/3]

- (WeakNSProtocol< NST >): (const WeakNSProtocol< NST > &)  that

Definition at line 124 of file weak_nsobject.h.

125 : container_(that.container_), checker_(that.checker_) {}
RefPtr< fml::WeakContainer > container_
debug::DebugThreadChecker checker_

◆ ~WeakNSProtocol

- (WeakNSProtocol< NST >):

◆ WeakNSProtocol [3/3]

- (WeakNSProtocol< NST >): (RefPtr< fml::WeakContainer >)  container
(const debug::DebugThreadChecker &)  checker 

Definition at line 169 of file weak_nsobject.h.

171 : container_(std::move(container)), checker_(checker) {}

Method Documentation

◆ CheckThreadSafety

- (void WeakNSProtocol< NST >): const

Definition at line 176 of file weak_nsobject.h.

#define FML_DCHECK_CREATION_THREAD_IS_CURRENT(c)

◆ get

- (NST WeakNSProtocol< NST >): const

Definition at line 133 of file weak_nsobject.h.

133 {
135 if (!container_.get()) {
136 return nil;
137 }
138 return container_->object();
139 }
T * get() const
Definition ref_ptr.h:116
void CheckThreadSafety() const

◆ operator NST

- (WeakNSProtocol< NST >): const

Definition at line 161 of file weak_nsobject.h.

161 {
163 return get();
164 }

◆ operator!=

- (bool WeakNSProtocol< NST >): (NST)  that const

Definition at line 154 of file weak_nsobject.h.

154 {
156 return get() != that;
157 }

◆ operator=

- (WeakNSProtocol & WeakNSProtocol< NST >): (const WeakNSProtocol< NST > &)  that

Definition at line 141 of file weak_nsobject.h.

141 {
142 // A WeakNSProtocol object can be copied on one thread and used on
143 // another.
144 container_ = that.container_;
145 checker_ = that.checker_;
146 return *this;
147 }

◆ operator==

- (bool WeakNSProtocol< NST >): (NST)  that const

Definition at line 149 of file weak_nsobject.h.

149 {
151 return get() == that;
152 }

◆ reset

- (void WeakNSProtocol< NST >):

Definition at line 129 of file weak_nsobject.h.

129 {
131 }
fml::RefPtr< fml::WeakContainer > containerForObject:threadChecker:(id object,[threadChecker] debug::DebugThreadChecker checker)

Friends And Related Symbol Documentation

◆ WeakNSObjectFactory< NST >

- (friend class WeakNSObjectFactory< NST >)
friend

Definition at line 161 of file weak_nsobject.h.

Member Data Documentation

◆ checker_

- (DebugThreadChecker) fml:
protected

Definition at line 178 of file weak_nsobject.h.

◆ container_

- (WeakContainer>) fml:
protected

Definition at line 175 of file weak_nsobject.h.


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