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

Public Member Functions

 TypeVariableSubstitution (const TypeVariableSubstitution &other)=default
 
cstring compose (const IR::ITypeVar *var, const IR::Type *substitution)
 
void debugValidate ()
 
bool setBinding (const IR::ITypeVar *id, const IR::Type *type) override
 
bool setBindings (const IR::Node *errorLocation, const IR::TypeParameters *params, const IR::Vector< IR::Type > *args)
 
void simpleCompose (const TypeVariableSubstitution *other)
 
- Public Member Functions inherited from P4::TypeSubstitution< const IR::ITypeVar * >
 TypeSubstitution (const TypeSubstitution &other)=default
 
void clear ()
 
bool containsKey (const IR::ITypeVar *key) const
 
void dbprint (std::ostream &out) const
 
const IR::Type * get (const IR::ITypeVar *t) const
 
bool isIdentity () const
 
const IR::Type * lookup (const IR::ITypeVar *t) const
 
TypeSubstitutionoperator= (const TypeSubstitution &other)=default
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Additional Inherited Members

- Protected Attributes inherited from P4::TypeSubstitution< const IR::ITypeVar * >
ordered_map< const IR::ITypeVar *, const IR::Type * > binding
 

Member Function Documentation

◆ compose()

cstring P4::TypeVariableSubstitution::compose ( const IR::ITypeVar * var,
const IR::Type * substitution )

Returns an empty string on error, or an error message format otherwise. The error message should be used with 'var' and 'substitution' as arguments when reporting an error (i.e., it may contain %1% and %2% inside).

◆ setBinding()

bool P4::TypeVariableSubstitution::setBinding ( const IR::ITypeVar * id,
const IR::Type * type )
inlineoverridevirtual