![]() |
P4C
The P4 Compiler
|
#include <compile_context.h>
Public Member Functions | |
| AutoCompileContext (const AutoCompileContext &)=delete | |
| AutoCompileContext (ICompileContext *context) | |
| Borrow a context which outlives this stack entry. | |
| AutoCompileContext (std::unique_ptr< ICompileContext > context) | |
| Own a context and release it after removing it from the stack. | |
| AutoCompileContext & | operator= (const AutoCompileContext &)=delete |
A RAII helper which pushes a compilation context onto the stack when it's created and pops it off when it's destroyed. To ensure the compilation stack is always nested correctly, this is the only interface for pushing or popping compilation contexts.