CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::Report Class Reference

Report exception class which contains a completely constructed message with optional line marker, hints, and context description. More...

#include <CeresEngine/Material/ShaderCompiler/Report.hpp>

Inheritance diagram for CeresEngine::ShaderCompiler::Report:

Public Member Functions

 Report (const Report &)=default
 
Report & operator= (const Report &)=default
 
 Report (const ReportTypes type, const String &message, const String &context="")
 
 Report (const ReportTypes type, const String &message, const String &line, const String &marker, const String &context="")
 
const char * what () const noexcept override
 Overrides the 'std::exception::what' function.
 
void takeHints (Vector< String > &&hints)
 Moves the specified hints into this report.
 
ReportTypes getType () const
 Returns the type of this report.
 
const String & getContext () const
 Returns the context description string (e.g. a function name where the report occured). This may also be empty.
 
const String & getMessage () const
 Returns the message string.
 
const String & getLine () const
 Returns the line string where the report occured. This line never has new-line characters at its end.
 
const String & getMarker () const
 Returns the line marker string to highlight the area where the report occured.
 
const Vector< String > & getHints () const
 Returns the list of optional hints of the report.
 
bool hasLine () const
 Returns true if this report has a line with line marker.
 

Private Attributes

ReportTypes mType = ReportTypes::Info
 
String mContext
 
String mMessage
 
String mLine
 
String mMarker
 
Vector< String > mHints
 

Detailed Description

Report exception class which contains a completely constructed message with optional line marker, hints, and context description.

Constructor & Destructor Documentation

◆ Report() [1/3]

CeresEngine::ShaderCompiler::Report::Report ( const Report &  )
default

◆ Report() [2/3]

CeresEngine::ShaderCompiler::Report::Report ( const ReportTypes  type,
const String &  message,
const String &  context = "" 
)
inline

◆ Report() [3/3]

CeresEngine::ShaderCompiler::Report::Report ( const ReportTypes  type,
const String &  message,
const String &  line,
const String &  marker,
const String &  context = "" 
)
inline

Remove new-line characters from end of source line

Member Function Documentation

◆ getContext()

const String & CeresEngine::ShaderCompiler::Report::getContext ( ) const
inline

Returns the context description string (e.g. a function name where the report occured). This may also be empty.

◆ getHints()

const Vector< String > & CeresEngine::ShaderCompiler::Report::getHints ( ) const
inline

Returns the list of optional hints of the report.

◆ getLine()

const String & CeresEngine::ShaderCompiler::Report::getLine ( ) const
inline

Returns the line string where the report occured. This line never has new-line characters at its end.

◆ getMarker()

const String & CeresEngine::ShaderCompiler::Report::getMarker ( ) const
inline

Returns the line marker string to highlight the area where the report occured.

◆ getMessage()

const String & CeresEngine::ShaderCompiler::Report::getMessage ( ) const
inline

Returns the message string.

◆ getType()

ReportTypes CeresEngine::ShaderCompiler::Report::getType ( ) const
inline

Returns the type of this report.

◆ hasLine()

bool CeresEngine::ShaderCompiler::Report::hasLine ( ) const
inline

Returns true if this report has a line with line marker.

See also
Line
Marker

◆ operator=()

Report & CeresEngine::ShaderCompiler::Report::operator= ( const Report &  )
default

◆ takeHints()

void CeresEngine::ShaderCompiler::Report::takeHints ( Vector< String > &&  hints)
inline

Moves the specified hints into this report.

◆ what()

const char * CeresEngine::ShaderCompiler::Report::what ( ) const
inlineoverridenoexcept

Overrides the 'std::exception::what' function.

Member Data Documentation

◆ mContext

String CeresEngine::ShaderCompiler::Report::mContext
private

◆ mHints

Vector<String> CeresEngine::ShaderCompiler::Report::mHints
private

◆ mLine

String CeresEngine::ShaderCompiler::Report::mLine
private

◆ mMarker

String CeresEngine::ShaderCompiler::Report::mMarker
private

◆ mMessage

String CeresEngine::ShaderCompiler::Report::mMessage
private

◆ mType

ReportTypes CeresEngine::ShaderCompiler::Report::mType = ReportTypes::Info
private

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