P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ComplexValues Class Referencefinal

Classes

struct  Component
 
struct  FieldsMap
 
struct  FinalName
 

Public Member Functions

 ComplexValues (TypeMap *typeMap, NameGenerator &nameGen)
 
template<class T >
void explode (std::string_view prefix, const IR::Type_Struct *type, FieldsMap *map, IR::Vector< T > *result)
 Flatten a nested struct to only contain field declaration or non-nested struct.
 
ComponentgetTranslation (const IR::Expression *expression) const
 
ComponentgetTranslation (const IR::IDeclaration *decl) const
 
bool isNestedStruct (const IR::Type *type) const
 Helper function that test if a struct is nested.
 
void setTranslation (const IR::Expression *expression, Component *comp)
 

Public Attributes

NameGeneratornameGen
 
std::map< const IR::Expression *, Component * > translation
 
TypeMaptypeMap
 
std::map< const IR::Declaration_Variable *, Component * > values