P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BaseCompileContext Class Reference

#include <compile_context.h>

Inheritance diagram for P4::BaseCompileContext:
[legend]

Public Member Functions

virtual ErrorReportererrorReporter ()
 
virtual DiagnosticAction getDefaultErrorDiagnosticAction ()
 
virtual DiagnosticAction getDefaultInfoDiagnosticAction ()
 
virtual DiagnosticAction getDefaultWarningDiagnosticAction ()
 

Static Public Member Functions

static BaseCompileContextget ()
 

Protected Member Functions

 BaseCompileContext (const BaseCompileContext &other)=default
 
BaseCompileContextoperator= (const BaseCompileContext &other)=default
 
- Protected Member Functions inherited from P4::ICompileContext

Detailed Description

A base compilation context which provides members needed by code in libp4ctoolkit. Compilation context types should normally inherit from BaseCompileContext.

Member Function Documentation

◆ errorReporter()

ErrorReporter & P4::BaseCompileContext::errorReporter ( )
virtual
Returns
the error reporter for this compilation context.

◆ get()

BaseCompileContext & P4::BaseCompileContext::get ( )
static
Returns
the current compilation context, which must inherit from BaseCompileContext.

◆ getDefaultErrorDiagnosticAction()

DiagnosticAction P4::BaseCompileContext::getDefaultErrorDiagnosticAction ( )
virtual
Returns
the default diagnostic action for calls to P4::error().

◆ getDefaultInfoDiagnosticAction()

DiagnosticAction P4::BaseCompileContext::getDefaultInfoDiagnosticAction ( )
virtual
Returns
the default diagnostic action for calls to P4::info().

Reimplemented in P4::P4CContext.

◆ getDefaultWarningDiagnosticAction()

DiagnosticAction P4::BaseCompileContext::getDefaultWarningDiagnosticAction ( )
virtual
Returns
the default diagnostic action for calls to P4::warning().

Reimplemented in P4::P4CContext.