Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SkSL::ErrorReporter Class Referenceabstract

#include <SkSLErrorReporter.h>

Inheritance diagram for SkSL::ErrorReporter:
SkSL::NoOpErrorReporter SkSL::TestingOnly_AbortErrorReporter

Public Member Functions

 ErrorReporter ()
 
virtual ~ErrorReporter ()
 
void error (Position position, std::string_view msg)
 
std::string_view source () const
 
void setSource (std::string_view source)
 
int errorCount () const
 
void resetErrorCount ()
 

Protected Member Functions

virtual void handleError (std::string_view msg, Position position)=0
 

Detailed Description

Class which is notified in the event of an error.

Definition at line 22 of file SkSLErrorReporter.h.

Constructor & Destructor Documentation

◆ ErrorReporter()

SkSL::ErrorReporter::ErrorReporter ( )
inline

Definition at line 24 of file SkSLErrorReporter.h.

24{}

◆ ~ErrorReporter()

virtual SkSL::ErrorReporter::~ErrorReporter ( )
inlinevirtual

Definition at line 26 of file SkSLErrorReporter.h.

26{}

Member Function Documentation

◆ error()

void SkSL::ErrorReporter::error ( Position  position,
std::string_view  msg 
)

Definition at line 16 of file SkSLErrorReporter.cpp.

16 {
18 // Don't report errors on poison values.
19 return;
20 }
21 ++fErrorCount;
22 this->handleError(msg, position);
23}
static constexpr const char POISON_TAG[]
virtual void handleError(std::string_view msg, Position position)=0
constexpr bool contains(std::string_view str, std::string_view needle)

◆ errorCount()

int SkSL::ErrorReporter::errorCount ( ) const
inline

Definition at line 34 of file SkSLErrorReporter.h.

34 {
35 return fErrorCount;
36 }

◆ handleError()

virtual void SkSL::ErrorReporter::handleError ( std::string_view  msg,
Position  position 
)
protectedpure virtual

Called when an error is reported.

Implemented in SkSL::TestingOnly_AbortErrorReporter, and SkSL::NoOpErrorReporter.

◆ resetErrorCount()

void SkSL::ErrorReporter::resetErrorCount ( )
inline

Definition at line 38 of file SkSLErrorReporter.h.

38 {
39 fErrorCount = 0;
40 }

◆ setSource()

void SkSL::ErrorReporter::setSource ( std::string_view  source)
inline

Definition at line 32 of file SkSLErrorReporter.h.

32{ fSource = source; }
std::string_view source() const

◆ source()

std::string_view SkSL::ErrorReporter::source ( ) const
inline

Definition at line 30 of file SkSLErrorReporter.h.

30{ return fSource; }

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