P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::AbstractField Class Referenceabstract

#include <phv_fields.h>

Inheritance diagram for PHV::AbstractField:
[legend]

Public Member Functions

template<typename T >
const T & as () const
 
virtual const PHV::Fieldfield () const =0
 
template<typename T >
bool is () const
 
virtual const le_bitrangerange () const =0
 
virtual int size () const =0
 
template<typename T >
const T * to () const
 

Static Public Member Functions

static AbstractFieldcreate (const PhvInfo &, const IR::Expression *)
 

Detailed Description

The base class for PHV::FieldSlice and PHV::Constant. A field list could have both field slice and constant.

Member Function Documentation

◆ field()

virtual const PHV::Field * PHV::AbstractField::field ( ) const
pure virtual

Implemented in PHV::FieldSlice.

◆ range()

virtual const le_bitrange & PHV::AbstractField::range ( ) const
pure virtual

Implemented in PHV::FieldSlice.

◆ size()

virtual int PHV::AbstractField::size ( ) const
pure virtual

Implemented in PHV::FieldSlice.