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

#include <constraints.h>

Inheritance diagram for Constraints::AlignmentConstraint:
[legend]

Public Types

enum  AlignmentReason {
  NONE = 0 , BRIDGE = (1 << 0) , PARSER = (1 << 1) , DEPARSER = (1 << 2) ,
  TERNARY_MATCH = (1 << 3) , DIGEST = (1 << 4) , INTRINSIC = (1 << 5) , PA_BYTE_PACK = (1 << 6)
}
 

Public Member Functions

void addConstraint (unsigned source, unsigned v)
 
void eraseConstraint ()
 
unsigned getAlignment () const
 
unsigned getContainerSize () const
 
unsigned getReason () const
 
bool hasConstraint () const
 
bool isBridged () const
 
bool isDeparser () const
 
bool isDigest () const
 
bool isIntrinsic () const
 
bool isParser () const
 
bool isTernaryMatch () const
 
bool operator< (AlignmentConstraint const &a) const
 
bool operator== (const AlignmentConstraint &a) const
 
void setContainerSize (unsigned size)
 
void updateConstraint (unsigned source)
 

Protected Attributes

unsigned container_size = 0
 

Detailed Description

This class represents the alignment constraint, which implies that field must start at a particular offset within a byte.

Member Function Documentation

◆ addConstraint()

void Constraints::AlignmentConstraint::addConstraint ( unsigned source,
unsigned v )
inlinevirtual

◆ hasConstraint()

bool Constraints::AlignmentConstraint::hasConstraint ( ) const
inlinevirtual