P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ControlPlaneAPI::P4RuntimeSymbolTableIface Class Referenceabstract

#include <p4RuntimeArchHandler.h>

Inheritance diagram for P4::ControlPlaneAPI::P4RuntimeSymbolTableIface:
[legend]

Public Member Functions

virtual void add (P4RuntimeSymbolType type, const IR::IDeclaration *declaration)=0
 Add a @type symbol, extracting the name and id from @declaration.
 
and possibly an explicit P4 '@id'.

Add a @type symbol with

virtual void add (P4RuntimeSymbolType type, cstring name, std::optional< p4rt_id_t > id=std::nullopt)=0
 
virtual p4rt_id_t getId (P4RuntimeSymbolType type, const IR::IDeclaration *declaration) const =0
 
.
Returns
the P4Runtime id for the symbol of @type with name
virtual p4rt_id_t getId (P4RuntimeSymbolType type, cstring name) const =0
 
virtual cstring getAlias (cstring name) const =0
 

Detailed Description

A table which tracks the symbols which are visible to P4Runtime and their ids.

Member Function Documentation

◆ add()

virtual void P4::ControlPlaneAPI::P4RuntimeSymbolTableIface::add ( P4RuntimeSymbolType type,
const IR::IDeclaration * declaration )
pure virtual

Add a @type symbol, extracting the name and id from @declaration.

Implemented in P4::ControlPlaneAPI::P4RuntimeSymbolTable.

◆ getAlias()

virtual cstring P4::ControlPlaneAPI::P4RuntimeSymbolTableIface::getAlias ( cstring name) const
pure virtual
Returns
the alias for the given fully qualified external name. P4Runtime defines an alias for each object to make referring to objects easier. By default, the alias is the shortest unique suffix of path components in the name.

Implemented in P4::ControlPlaneAPI::P4RuntimeSymbolTable.

◆ getId()

virtual p4rt_id_t P4::ControlPlaneAPI::P4RuntimeSymbolTableIface::getId ( P4RuntimeSymbolType type,
const IR::IDeclaration * declaration ) const
pure virtual
Returns
the P4Runtime id for the symbol of @type corresponding to @declaration.

Implemented in P4::ControlPlaneAPI::P4RuntimeSymbolTable.