P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ParameterSubstitution Class Reference
Inheritance diagram for P4::ParameterSubstitution:
[legend]

Public Member Functions

 ParameterSubstitution (const ParameterSubstitution &other)=default
 
void add (const IR::Parameter *parameter, const IR::Argument *value)
 
bool contains (const IR::Parameter *param) const
 
void dbprint (std::ostream &out) const
 
bool empty () const
 
const IR::Parameter * findParameter (const IR::Argument *argument) const
 
Util::Enumerator< const IR::Parameter * > * getParametersInArgumentOrder () const
 Returns parameters in the order they were added.
 
Util::Enumerator< const IR::Parameter * > * getParametersInOrder () const
 
const IR::Argument * lookup (const IR::Parameter *param) const
 
const IR::Argument * lookupByName (cstring name) const
 
void populate (const IR::ParameterList *params, const IR::Vector< IR::Argument > *args)
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Protected Member Functions

bool containsName (cstring name) const
 

Member Function Documentation

◆ dbprint()

void P4::ParameterSubstitution::dbprint ( std::ostream & out) const
inlinevirtual

Implements P4::IHasDbPrint.

◆ getParametersInOrder()

Util::Enumerator< const IR::Parameter * > * P4::ParameterSubstitution::getParametersInOrder ( ) const
inline

Returns parameters in the order of the parameter list. Only works if parameters were inserted using populate.

◆ populate()

void P4::ParameterSubstitution::populate ( const IR::ParameterList * params,
const IR::Vector< IR::Argument > * args )

Only the parameters which have corresponding arguments will be bound. PARAMETERS ARE ADDED IN THE ORDER OF THE ARGUMENTS.