P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::v2::AllocResult Struct Reference

#include <utils_v2.h>

Inheritance diagram for PHV::v2::AllocResult:
[legend]

Public Member Functions

 AllocResult (const AllocError *err)
 
 AllocResult (const Transaction &tx)
 
std::string err_str () const
 
bool ok () const
 
bool operator== (const AllocResult &other) const
 
std::string tx_str (cstring prefix=""_cs) const
 

Static Public Member Functions

static std::string pretty_print_tx (const PHV::Transaction &tx, cstring prefix=cstring::empty)
 

Public Attributes

const AllocErrorerr = nullptr
 
std::optional< PHV::Transactiontx
 

Detailed Description

AllocResult is the most common return type of an allocation function. It is either an error or a PHV::Transaction if succeeded.