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

#include <constraints.h>

Inheritance diagram for Constraints::SolitaryConstraint:
[legend]

Public Types

enum  SolitaryReason {
  NONE = 0 , ALU = (1 << 0) , CHECKSUM = (1 << 1) , ARCH = (1 << 2) ,
  DIGEST = (1 << 3) , PRAGMA_SOLITARY = (1 << 4) , PRAGMA_CONTAINER_SIZE = (1 << 5) , CONFLICT_ALIGNMENT = (1 << 6) ,
  CLEAR_ON_WRITE = (1 << 7)
}
 

Public Member Functions

void addConstraint (uint32_t r)
 
bool hasConstraint () const
 
bool isALU () const
 
bool isArch () const
 
bool isChecksum () const
 
bool isClearOnWrite () const
 
bool isDigest () const
 
bool isOnlyClearOnWrite () const
 
bool isPragmaContainerSize () const
 
bool isPragmaSolitary () const
 

Detailed Description

This class represents the solitary constraint, which implies that the field cannot be packed with any other field in the same container. Note that solitary constraint does not preclude fields sharing the same container through overlay.

Member Function Documentation

◆ addConstraint()

void Constraints::SolitaryConstraint::addConstraint ( uint32_t r)
inlinevirtual

◆ hasConstraint()

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