Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSL::AutoOutputStream Class Reference

#include <SkSLCodeGenerator.h>

Public Member Functions

 AutoOutputStream (CodeGenerator *codeGen, OutputStream *newOutput)
 
 AutoOutputStream (CodeGenerator *codeGen, OutputStream *newOutput, int *indentationPtr)
 
 ~AutoOutputStream ()
 

Detailed Description

Definition at line 68 of file SkSLCodeGenerator.h.

Constructor & Destructor Documentation

◆ AutoOutputStream() [1/2]

SkSL::AutoOutputStream::AutoOutputStream ( CodeGenerator codeGen,
OutputStream newOutput 
)
inline

Definition at line 71 of file SkSLCodeGenerator.h.

72 : fCodeGen(codeGen)
73 , fOldOutput(codeGen->outputStream()) {
74 fCodeGen->setOutputStream(newOutput);
75 }
void setOutputStream(OutputStream *output)

◆ AutoOutputStream() [2/2]

SkSL::AutoOutputStream::AutoOutputStream ( CodeGenerator codeGen,
OutputStream newOutput,
int indentationPtr 
)
inline

Definition at line 77 of file SkSLCodeGenerator.h.

78 : fCodeGen(codeGen)
79 , fOldOutput(codeGen->outputStream())
80 , fIndentationPtr(indentationPtr)
81 , fOldIndentation(indentationPtr ? *indentationPtr : 0) {
82 fCodeGen->setOutputStream(newOutput);
83 *fIndentationPtr = 0;
84 }

◆ ~AutoOutputStream()

SkSL::AutoOutputStream::~AutoOutputStream ( )
inline

Definition at line 85 of file SkSLCodeGenerator.h.

85 {
86 fCodeGen->setOutputStream(fOldOutput);
87 if (fIndentationPtr) {
88 *fIndentationPtr = fOldIndentation;
89 }
90 }

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