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

#include <SkSLStatement.h>

Inheritance diagram for SkSL::Statement:
SkSL::IRNode SkSL::Poolable SkSL::Block SkSL::BreakStatement SkSL::ContinueStatement SkSL::DiscardStatement SkSL::DoStatement SkSL::ExpressionStatement SkSL::ForStatement SkSL::IfStatement SkSL::Nop SkSL::ReturnStatement SkSL::SwitchCase SkSL::SwitchStatement SkSL::VarDeclaration

Public Types

using Kind = StatementKind
 

Public Member Functions

 Statement (Position pos, Kind kind)
 
Kind kind () const
 
virtual bool isEmpty () const
 
- Public Member Functions inherited from SkSL::IRNode
virtual ~IRNode ()
 
virtual std::string description () const =0
 
 IRNode (const IRNode &)=delete
 
IRNodeoperator= (const IRNode &)=delete
 
Position position () const
 
void setPosition (Position p)
 
template<typename T >
bool is () const
 
template<typename T >
const Tas () const
 
template<typename T >
Tas ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SkSL::Poolable
static void * operator new (const size_t size)
 
static void operator delete (void *ptr)
 
- Public Attributes inherited from SkSL::IRNode
Position fPosition
 
- Protected Member Functions inherited from SkSL::IRNode
 IRNode (Position position, int kind)
 
- Protected Attributes inherited from SkSL::IRNode
int fKind
 

Detailed Description

Abstract supertype of all statements.

Definition at line 19 of file SkSLStatement.h.

Member Typedef Documentation

◆ Kind

Definition at line 21 of file SkSLStatement.h.

Constructor & Destructor Documentation

◆ Statement()

SkSL::Statement::Statement ( Position  pos,
Kind  kind 
)
inline

Definition at line 23 of file SkSLStatement.h.

24 : INHERITED(pos, (int) kind) {
25 SkASSERT(kind >= Kind::kFirst && kind <= Kind::kLast);
26 }
SkPoint pos
#define SkASSERT(cond)
Definition: SkAssert.h:116
Kind kind() const
Definition: SkSLStatement.h:28

Member Function Documentation

◆ isEmpty()

virtual bool SkSL::Statement::isEmpty ( ) const
inlinevirtual

Reimplemented in SkSL::Block, and SkSL::Nop.

Definition at line 32 of file SkSLStatement.h.

32 {
33 return false;
34 }

◆ kind()

Kind SkSL::Statement::kind ( ) const
inline

Definition at line 28 of file SkSLStatement.h.

28 {
29 return (Kind) fKind;
30 }

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