P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BitRange::StartLen Struct Reference

#include <bitrange.h>

Public Member Functions

 StartLen (const StartLen &)=delete
 
 StartLen (int start, int len)
 
StartLenoperator= (const StartLen &)=delete
 

Public Attributes

const int len
 
const int start
 

Detailed Description

A helper type used to construct a range, specified as the region of a certain length beginning at a certain bit index. For example, StartLen(6, 8) denotes a range containing eight bits: bit 6, bit 7, bit 8, bit 9, bit 10, bit 11, bit 12, and bit 13.

As with FromTo, StartLen is only meant to be used when constructing a HalfOpenRange or ClosedRange.