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 ErrorReporter & errorReporter ()
 
virtual DiagnosticAction getDefaultErrorDiagnosticAction ()
 
virtual DiagnosticAction getDefaultInfoDiagnosticAction ()
 
virtual DiagnosticAction getDefaultWarningDiagnosticAction ()
 

Static Public Member Functions

static BaseCompileContext & get ()
 

Protected Member Functions

 BaseCompileContext (const BaseCompileContext &other)=default
 
BaseCompileContext & operator= (const BaseCompileContext &other)=default
 

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.