Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
base::scoped_nsprotocol< NST > Class Template Reference

#include <scoped_nsobject.h>

Inheritance diagram for base::scoped_nsprotocol< NST >:
base::scoped_nsobject< AXPlatformNodeCocoa >

Public Member Functions

 scoped_nsprotocol (NST object=nil)
 
 scoped_nsprotocol (const scoped_nsprotocol< NST > &that)
 
template<typename NSU >
 scoped_nsprotocol (const scoped_nsprotocol< NSU > &that)
 
 ~scoped_nsprotocol ()
 
scoped_nsprotocoloperator= (const scoped_nsprotocol< NST > &that)
 
void reset (NST object=nil)
 
bool operator== (NST that) const
 
bool operator!= (NST that) const
 
 operator NST () const
 
NST get () const
 
void swap (scoped_nsprotocol &that)
 
NST autorelease ()
 

Detailed Description

template<typename NST>
class base::scoped_nsprotocol< NST >

Definition at line 41 of file scoped_nsobject.h.

Constructor & Destructor Documentation

◆ scoped_nsprotocol() [1/3]

template<typename NST >
base::scoped_nsprotocol< NST >::scoped_nsprotocol ( NST  object = nil)
inlineexplicit

Definition at line 43 of file scoped_nsobject.h.

43: object_(object) {}

◆ scoped_nsprotocol() [2/3]

template<typename NST >
base::scoped_nsprotocol< NST >::scoped_nsprotocol ( const scoped_nsprotocol< NST > &  that)
inline

Definition at line 45 of file scoped_nsobject.h.

45: object_([that.object_ retain]) {}

◆ scoped_nsprotocol() [3/3]

template<typename NST >
template<typename NSU >
base::scoped_nsprotocol< NST >::scoped_nsprotocol ( const scoped_nsprotocol< NSU > &  that)
inline

Definition at line 48 of file scoped_nsobject.h.

48: object_([that.get() retain]) {}

◆ ~scoped_nsprotocol()

template<typename NST >
base::scoped_nsprotocol< NST >::~scoped_nsprotocol ( )
inline

Definition at line 50 of file scoped_nsobject.h.

50{ [object_ release]; }

Member Function Documentation

◆ autorelease()

template<typename NST >
NST base::scoped_nsprotocol< NST >::autorelease ( )
inline

Definition at line 80 of file scoped_nsobject.h.

80{ return [release() autorelease]; }

◆ get()

template<typename NST >
NST base::scoped_nsprotocol< NST >::get ( ) const
inline

Definition at line 71 of file scoped_nsobject.h.

71{ return object_; }

◆ operator NST()

template<typename NST >
base::scoped_nsprotocol< NST >::operator NST ( ) const
inline

Definition at line 69 of file scoped_nsobject.h.

69{ return object_; }

◆ operator!=()

template<typename NST >
bool base::scoped_nsprotocol< NST >::operator!= ( NST  that) const
inline

Definition at line 67 of file scoped_nsobject.h.

67{ return object_ != that; }

◆ operator=()

template<typename NST >
scoped_nsprotocol & base::scoped_nsprotocol< NST >::operator= ( const scoped_nsprotocol< NST > &  that)
inline

Definition at line 52 of file scoped_nsobject.h.

52 {
53 reset([that.get() retain]);
54 return *this;
55 }
m reset()

◆ operator==()

template<typename NST >
bool base::scoped_nsprotocol< NST >::operator== ( NST  that) const
inline

Definition at line 66 of file scoped_nsobject.h.

66{ return object_ == that; }

◆ reset()

template<typename NST >
void base::scoped_nsprotocol< NST >::reset ( NST  object = nil)
inline

Definition at line 57 of file scoped_nsobject.h.

57 {
58 // We intentionally do not check that object != object_ as the caller must
59 // either already have an ownership claim over whatever it passes to this
60 // method, or call it with the |RETAIN| policy which will have ensured that
61 // the object is retained once more when reaching this point.
62 [object_ release];
63 object_ = object;
64 }

◆ swap()

template<typename NST >
void base::scoped_nsprotocol< NST >::swap ( scoped_nsprotocol< NST > &  that)
inline

Definition at line 73 of file scoped_nsobject.h.

73 {
74 NST temp = that.object_;
75 that.object_ = object_;
76 object_ = temp;
77 }

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