Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSVGRenderContext::BorrowedNode Class Reference

#include <SkSVGRenderContext.h>

Public Member Functions

 BorrowedNode (sk_sp< SkSVGNode > *node)
 
 ~BorrowedNode ()
 
const SkSVGNodeget () const
 
const SkSVGNodeoperator-> () const
 
const SkSVGNodeoperator* () const
 
 operator bool () const
 

Detailed Description

Definition at line 99 of file SkSVGRenderContext.h.

Constructor & Destructor Documentation

◆ BorrowedNode()

SkSVGRenderContext::BorrowedNode::BorrowedNode ( sk_sp< SkSVGNode > *  node)
inlineexplicit

Definition at line 101 of file SkSVGRenderContext.h.

102 : fOwner(node) {
103 if (fOwner) {
104 fBorrowed = std::move(*fOwner);
105 *fOwner = nullptr;
106 }
107 }

◆ ~BorrowedNode()

SkSVGRenderContext::BorrowedNode::~BorrowedNode ( )
inline

Definition at line 109 of file SkSVGRenderContext.h.

109 {
110 if (fOwner) {
111 *fOwner = std::move(fBorrowed);
112 }
113 }

Member Function Documentation

◆ get()

const SkSVGNode * SkSVGRenderContext::BorrowedNode::get ( ) const
inline

Definition at line 115 of file SkSVGRenderContext.h.

115{ return fBorrowed.get(); }
T * get() const
Definition: SkRefCnt.h:303

◆ operator bool()

SkSVGRenderContext::BorrowedNode::operator bool ( ) const
inlineexplicit

Definition at line 119 of file SkSVGRenderContext.h.

119{ return !!fBorrowed; }

◆ operator*()

const SkSVGNode & SkSVGRenderContext::BorrowedNode::operator* ( ) const
inline

Definition at line 117 of file SkSVGRenderContext.h.

117{ return *fBorrowed; }

◆ operator->()

const SkSVGNode * SkSVGRenderContext::BorrowedNode::operator-> ( ) const
inline

Definition at line 116 of file SkSVGRenderContext.h.

116{ return fBorrowed.get(); }

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