P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::AnnotationSelectionPolicy Class Reference

#include <flattenInterfaceStructs.h>

Public Member Functions

virtual bool keep (const IR::Annotation *)
 

Detailed Description

Policy to select which annotations of the nested struct to attach to the struct fields after the nest struct is flattened.

Member Function Documentation

◆ keep()

virtual bool P4::AnnotationSelectionPolicy::keep ( const IR::Annotation * )
inlinevirtual

Call for each nested struct to check if the annotation of the nested struct should be kept on its fields.

Returns
true if the annotation should be kept on the field. false if the annotation should be discarded.